I've got an error report on this line:
"Null check operator used on a null value".
Seems to be that after the await, the widget was destroyed. So attempting to set state on a destroyed widget => error.
Is it sufficient to add this check after an await and before setState?
if (!mounted) return;
I've got an error report on this line:
barcode_scanner/lib/src/ai_barcode_scanner.dart
Line 273 in 46f02b9
"Null check operator used on a null value".
Seems to be that after the await, the widget was destroyed. So attempting to set state on a destroyed widget => error.
Is it sufficient to add this check after an await and before setState?
if (!mounted) return;