Julian Steenbakker
Committed by GitHub

Update lib/src/mobile_scanner.dart

Co-authored-by: Navaron Bracke <brackenavaron@gmail.com>
@@ -265,7 +265,7 @@ class _MobileScannerState extends State<MobileScanner> @@ -265,7 +265,7 @@ class _MobileScannerState extends State<MobileScanner>
265 // every start is a hot-restart. 265 // every start is a hot-restart.
266 if (kDebugMode) { 266 if (kDebugMode) {
267 final platformInterface = MobileScannerPlatform.instance; 267 final platformInterface = MobileScannerPlatform.instance;
268 - if (platformInterface is MethodChannelMobileScanner) { 268 + if (MobileScannerPlatform.instance case final MethodChannelMobileScanner implementation) {
269 try { 269 try {
270 await platformInterface.stop(force: true); 270 await platformInterface.stop(force: true);
271 } catch (e) { 271 } catch (e) {