Gabriel Hilti

fix: Adapt app lifecycle states. In Android would the permission pop up again af…

…ter denying in the first time.
... ... @@ -162,16 +162,16 @@ class _MobileScannerState extends State<MobileScanner>
switch (state) {
case AppLifecycleState.resumed:
_resumeFromBackground = false;
_startScanner();
if (_resumeFromBackground) {
_startScanner();
}
break;
case AppLifecycleState.paused:
_resumeFromBackground = true;
break;
case AppLifecycleState.inactive:
if (!_resumeFromBackground) {
_controller.stop();
}
_resumeFromBackground = true;
_controller.stop();
break;
case AppLifecycleState.detached:
break;
... ...