mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 05:26:47 +00:00
Ignore barcode resume if not mounted (#371)
This commit is contained in:
parent
9cc666d13e
commit
367759e86c
@ -71,6 +71,12 @@ class _CameraBarcodeControllerState extends InvenTreeBarcodeControllerState {
|
||||
|
||||
@override
|
||||
Future<void> resumeScan() async {
|
||||
|
||||
// Do not attempt to resume if the widget is not mounted
|
||||
if (!mounted) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await _controller?.resumeCamera();
|
||||
} on CameraException {
|
||||
|
Loading…
x
Reference in New Issue
Block a user