Skip to content

Commit

Permalink
fix lint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
navaronbracke committed Feb 28, 2024
1 parent 4279cf3 commit a427f8d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions example/lib/barcode_list_scanner_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,15 @@ class _BarcodeListScannerWithControllerState
);
if (image != null) {
if (await controller.analyzeImage(image.path)) {
if (!mounted) return;
if (!context.mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('Barcode found!'),
backgroundColor: Colors.green,
),
);
} else {
if (!mounted) return;
if (!context.mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('No barcode found!'),
Expand Down
4 changes: 2 additions & 2 deletions example/lib/barcode_scanner_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,15 @@ class _BarcodeScannerWithControllerState
);
if (image != null) {
if (await controller.analyzeImage(image.path)) {
if (!mounted) return;
if (!context.mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('Barcode found!'),
backgroundColor: Colors.green,
),
);
} else {
if (!mounted) return;
if (!context.mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('No barcode found!'),
Expand Down
4 changes: 2 additions & 2 deletions example/lib/barcode_scanner_zoom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@ class _BarcodeScannerWithZoomState extends State<BarcodeScannerWithZoom>
);
if (image != null) {
if (await controller.analyzeImage(image.path)) {
if (!mounted) return;
if (!context.mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('Barcode found!'),
backgroundColor: Colors.green,
),
);
} else {
if (!mounted) return;
if (!context.mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('No barcode found!'),
Expand Down

0 comments on commit a427f8d

Please sign in to comment.