We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5afe109 commit 9c43d4bCopy full SHA for 9c43d4b
lib/src/mobile_scanner_controller.dart
@@ -357,6 +357,17 @@ class MobileScannerController extends ValueNotifier<MobileScannerState> {
357
),
358
);
359
});
360
+
361
+ // Abort if the controller was disposed
362
+ // while waiting for the widget to be attached.
363
+ if (_isDisposed) {
364
+ throw MobileScannerException(
365
+ errorCode: MobileScannerErrorCode.controllerDisposed,
366
+ errorDetails: MobileScannerErrorDetails(
367
+ message: MobileScannerErrorCode.controllerDisposed.message,
368
+ ),
369
+ );
370
+ }
371
}
372
373
if (cameraDirection == CameraFacing.unknown) {
0 commit comments