ensure the MobileScanner widget calls `super.dispose()` first
Showing
1 changed file
with
2 additions
and
2 deletions
| @@ -186,8 +186,8 @@ class _MobileScannerState extends State<MobileScanner> { | @@ -186,8 +186,8 @@ class _MobileScannerState extends State<MobileScanner> { | ||
| 186 | 186 | ||
| 187 | @override | 187 | @override |
| 188 | void dispose() { | 188 | void dispose() { |
| 189 | - // When this widget is unmounted, reset the scan window. | ||
| 190 | - widget.controller.updateScanWindow(null); | ||
| 191 | super.dispose(); | 189 | super.dispose(); |
| 190 | + // When this widget is unmounted, reset the scan window. | ||
| 191 | + unawaited(widget.controller.updateScanWindow(null)); | ||
| 192 | } | 192 | } |
| 193 | } | 193 | } |
-
Please register or login to post a comment