mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Ignore barcode resume if not mounted (#371)
This commit is contained in:
parent
9cc666d13e
commit
367759e86c
1 changed files with 6 additions and 0 deletions
|
|
@ -71,6 +71,12 @@ class _CameraBarcodeControllerState extends InvenTreeBarcodeControllerState {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> resumeScan() async {
|
Future<void> resumeScan() async {
|
||||||
|
|
||||||
|
// Do not attempt to resume if the widget is not mounted
|
||||||
|
if (!mounted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await _controller?.resumeCamera();
|
await _controller?.resumeCamera();
|
||||||
} on CameraException {
|
} on CameraException {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue