We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc746a3 commit 714c307Copy full SHA for 714c307
3 files changed
example/demo/barcode_mobile.gif
1.31 MB
example/demo/barcode_web.gif
1.22 MB
example/lib/main.dart
@@ -39,19 +39,20 @@ class _HomePageState extends State<HomePage> {
39
mainAxisSize: MainAxisSize.min,
40
children: [
41
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')),
+ onPressed: () async {
+ var res = await Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => const SimpleBarcodeScannerPage(),
+ ));
+ setState(() {
+ if (res is String) {
+ result = res;
+ }
+ });
+ },
+ child: const Text('Open Scanner'),
55
+ ),
56
Text('Barcode Result: $result'),
57
],
58
),
0 commit comments