Navaron Bracke

fix lint warning

@@ -154,7 +154,7 @@ class _BarcodeListScannerWithControllerState @@ -154,7 +154,7 @@ class _BarcodeListScannerWithControllerState
154 ); 154 );
155 if (image != null) { 155 if (image != null) {
156 if (await controller.analyzeImage(image.path)) { 156 if (await controller.analyzeImage(image.path)) {
157 - if (!mounted) return; 157 + if (!context.mounted) return;
158 ScaffoldMessenger.of(context).showSnackBar( 158 ScaffoldMessenger.of(context).showSnackBar(
159 const SnackBar( 159 const SnackBar(
160 content: Text('Barcode found!'), 160 content: Text('Barcode found!'),
@@ -162,7 +162,7 @@ class _BarcodeListScannerWithControllerState @@ -162,7 +162,7 @@ class _BarcodeListScannerWithControllerState
162 ), 162 ),
163 ); 163 );
164 } else { 164 } else {
165 - if (!mounted) return; 165 + if (!context.mounted) return;
166 ScaffoldMessenger.of(context).showSnackBar( 166 ScaffoldMessenger.of(context).showSnackBar(
167 const SnackBar( 167 const SnackBar(
168 content: Text('No barcode found!'), 168 content: Text('No barcode found!'),
@@ -170,7 +170,7 @@ class _BarcodeScannerWithControllerState @@ -170,7 +170,7 @@ class _BarcodeScannerWithControllerState
170 ); 170 );
171 if (image != null) { 171 if (image != null) {
172 if (await controller.analyzeImage(image.path)) { 172 if (await controller.analyzeImage(image.path)) {
173 - if (!mounted) return; 173 + if (!context.mounted) return;
174 ScaffoldMessenger.of(context).showSnackBar( 174 ScaffoldMessenger.of(context).showSnackBar(
175 const SnackBar( 175 const SnackBar(
176 content: Text('Barcode found!'), 176 content: Text('Barcode found!'),
@@ -178,7 +178,7 @@ class _BarcodeScannerWithControllerState @@ -178,7 +178,7 @@ class _BarcodeScannerWithControllerState
178 ), 178 ),
179 ); 179 );
180 } else { 180 } else {
181 - if (!mounted) return; 181 + if (!context.mounted) return;
182 ScaffoldMessenger.of(context).showSnackBar( 182 ScaffoldMessenger.of(context).showSnackBar(
183 const SnackBar( 183 const SnackBar(
184 content: Text('No barcode found!'), 184 content: Text('No barcode found!'),
@@ -171,7 +171,7 @@ class _BarcodeScannerWithZoomState extends State<BarcodeScannerWithZoom> @@ -171,7 +171,7 @@ class _BarcodeScannerWithZoomState extends State<BarcodeScannerWithZoom>
171 ); 171 );
172 if (image != null) { 172 if (image != null) {
173 if (await controller.analyzeImage(image.path)) { 173 if (await controller.analyzeImage(image.path)) {
174 - if (!mounted) return; 174 + if (!context.mounted) return;
175 ScaffoldMessenger.of(context).showSnackBar( 175 ScaffoldMessenger.of(context).showSnackBar(
176 const SnackBar( 176 const SnackBar(
177 content: Text('Barcode found!'), 177 content: Text('Barcode found!'),
@@ -179,7 +179,7 @@ class _BarcodeScannerWithZoomState extends State<BarcodeScannerWithZoom> @@ -179,7 +179,7 @@ class _BarcodeScannerWithZoomState extends State<BarcodeScannerWithZoom>
179 ), 179 ),
180 ); 180 );
181 } else { 181 } else {
182 - if (!mounted) return; 182 + if (!context.mounted) return;
183 ScaffoldMessenger.of(context).showSnackBar( 183 ScaffoldMessenger.of(context).showSnackBar(
184 const SnackBar( 184 const SnackBar(
185 content: Text('No barcode found!'), 185 content: Text('No barcode found!'),