flutter_barcode_reader
flutter_barcode_reader copied to clipboard
[Bug]Should not store rootViewController of window at plugin register
Describe the bug
Some app will change the rootViewController of window after startup.
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