Showing
1 changed file
with
1 additions
and
1 deletions
| @@ -285,7 +285,7 @@ class _MobileScannerState extends State<MobileScanner> | @@ -285,7 +285,7 @@ class _MobileScannerState extends State<MobileScanner> | ||
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | Future<void> disposeMobileScanner() async { | 287 | Future<void> disposeMobileScanner() async { |
| 288 | - if (widget.controller == null) { | 288 | + if (widget.onDetect != null) { |
| 289 | WidgetsBinding.instance.removeObserver(this); | 289 | WidgetsBinding.instance.removeObserver(this); |
| 290 | } | 290 | } |
| 291 | 291 |
-
Please register or login to post a comment