Closed James-A-White closed 5 years ago
Actually, I tracked this down to a behavior difference between Android and iOS. In Android, after the scan is completed, the scanning window closes and returns you to the original view. In iOS, the view is reset in a manner similar to what happens when the device is rotated. So, there is no bug, but the behaviors between iOS and Android ultimately should be the same.
For some reason, when I launch the scanner, it causes my navigation stack to pop at least one view. The back button then brings me to the start screen of my app. I'll investigate more, but I wanted to see if anyone else has witnessed this behavior.
... upon further investigation, this only affects iOS. It performs as expected on my Android app.
Here is the error that I am receiving, although I believe this is more indicative of a symptom of the problem (a widget being removed from the tree prematurely) rather than an indication of why it is happening in the first place.
Will continue to investigate.
13 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:507:14)
14 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:562:30)
15 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:102:24)
16 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:242:9)
17 TapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:204:7)
18 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
19 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:184:20)
20 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:158:22)
21 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:138:7)
22 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:101:7)
23 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:85:7)
24 _invoke1 (dart:ui/hooks.dart:159:13)
25 _dispatchPointerDataPacket (dart:ui/hooks.dart:113:5)