Skip to content

Commit 714c307

Browse files
demo gif added
1 parent cc746a3 commit 714c307

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

example/demo/barcode_mobile.gif

1.31 MB
Loading

example/demo/barcode_web.gif

1.22 MB
Loading

example/lib/main.dart

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,20 @@ class _HomePageState extends State<HomePage> {
3939
mainAxisSize: MainAxisSize.min,
4040
children: [
4141
ElevatedButton(
42-
onPressed: () async {
43-
var res = await Navigator.push(
44-
context,
45-
MaterialPageRoute(
46-
builder: (context) => const SimpleBarcodeScannerPage(),
47-
));
48-
setState(() {
49-
if (res is String) {
50-
result = res;
51-
}
52-
});
53-
},
54-
child: const Text('Open Scanner')),
42+
onPressed: () async {
43+
var res = await Navigator.push(
44+
context,
45+
MaterialPageRoute(
46+
builder: (context) => const SimpleBarcodeScannerPage(),
47+
));
48+
setState(() {
49+
if (res is String) {
50+
result = res;
51+
}
52+
});
53+
},
54+
child: const Text('Open Scanner'),
55+
),
5556
Text('Barcode Result: $result'),
5657
],
5758
),

0 commit comments

Comments
 (0)