flutter_barcode_reader icon indicating copy to clipboard operation
flutter_barcode_reader copied to clipboard

[Bug]Should not store rootViewController of window at plugin register

Open zouquan741 opened this issue 5 years ago • 0 comments

Describe the bug Some app will change the rootViewController of window after startup. image So we should not store rootViewController of window at plugin register. Otherwise we will get a Warning: Attempt to present <UINavigationController: 0x106665400> whose view is not in the window hierarchy!, and all UI will be freezed.

Expected behavior Use the current root vc to present BarcodeView when sacn method called.

Environment (please complete the following information):

  • [ ] iOS Version: 12.4.8
  • [ ] iPhone 6
  • Version of barcode_scan: 3.0.1
  • Output of flutter --version:
Flutter 1.20.2 • channel unknown • unknown source
Framework • revision bbfbf1770c (5 weeks ago) • 2020-08-13 08:33:09 -0700
Engine • revision 9d5b21729f
Tools • Dart 2.9.1

zouquan741 avatar Sep 17 '20 09:09 zouquan741