Showing
1 changed file
with
77 additions
and
75 deletions
| @@ -23,82 +23,84 @@ class MyHome extends StatelessWidget { | @@ -23,82 +23,84 @@ class MyHome extends StatelessWidget { | ||
| 23 | Widget build(BuildContext context) { | 23 | Widget build(BuildContext context) { |
| 24 | return Scaffold( | 24 | return Scaffold( |
| 25 | appBar: AppBar(title: const Text('Mobile Scanner Example')), | 25 | appBar: AppBar(title: const Text('Mobile Scanner Example')), |
| 26 | - body: Column( | ||
| 27 | - mainAxisAlignment: MainAxisAlignment.center, | ||
| 28 | - children: [ | ||
| 29 | - ElevatedButton( | ||
| 30 | - onPressed: () { | ||
| 31 | - Navigator.of(context).push( | ||
| 32 | - MaterialPageRoute( | ||
| 33 | - builder: (context) => const BarcodeScannerListView(), | ||
| 34 | - ), | ||
| 35 | - ); | ||
| 36 | - }, | ||
| 37 | - child: const Text('MobileScanner with ListView'), | ||
| 38 | - ), | ||
| 39 | - ElevatedButton( | ||
| 40 | - onPressed: () { | ||
| 41 | - Navigator.of(context).push( | ||
| 42 | - MaterialPageRoute( | ||
| 43 | - builder: (context) => const BarcodeScannerWithController(), | ||
| 44 | - ), | ||
| 45 | - ); | ||
| 46 | - }, | ||
| 47 | - child: const Text('MobileScanner with Controller'), | ||
| 48 | - ), | ||
| 49 | - ElevatedButton( | ||
| 50 | - onPressed: () { | ||
| 51 | - Navigator.of(context).push( | ||
| 52 | - MaterialPageRoute( | ||
| 53 | - builder: (context) => const BarcodeScannerWithScanWindow(), | ||
| 54 | - ), | ||
| 55 | - ); | ||
| 56 | - }, | ||
| 57 | - child: const Text('MobileScanner with ScanWindow'), | ||
| 58 | - ), | ||
| 59 | - ElevatedButton( | ||
| 60 | - onPressed: () { | ||
| 61 | - Navigator.of(context).push( | ||
| 62 | - MaterialPageRoute( | ||
| 63 | - builder: (context) => const BarcodeScannerReturningImage(), | ||
| 64 | - ), | ||
| 65 | - ); | ||
| 66 | - }, | ||
| 67 | - child: const Text( | ||
| 68 | - 'MobileScanner with Controller (returning image)', | 26 | + body: Center( |
| 27 | + child: Column( | ||
| 28 | + mainAxisAlignment: MainAxisAlignment.spaceAround, | ||
| 29 | + children: [ | ||
| 30 | + ElevatedButton( | ||
| 31 | + onPressed: () { | ||
| 32 | + Navigator.of(context).push( | ||
| 33 | + MaterialPageRoute( | ||
| 34 | + builder: (context) => const BarcodeScannerListView(), | ||
| 35 | + ), | ||
| 36 | + ); | ||
| 37 | + }, | ||
| 38 | + child: const Text('MobileScanner with ListView'), | ||
| 69 | ), | 39 | ), |
| 70 | - ), | ||
| 71 | - ElevatedButton( | ||
| 72 | - onPressed: () { | ||
| 73 | - Navigator.of(context).push( | ||
| 74 | - MaterialPageRoute( | ||
| 75 | - builder: (context) => const BarcodeScannerWithZoom(), | ||
| 76 | - ), | ||
| 77 | - ); | ||
| 78 | - }, | ||
| 79 | - child: const Text('MobileScanner with zoom slider'), | ||
| 80 | - ), | ||
| 81 | - ElevatedButton( | ||
| 82 | - onPressed: () { | ||
| 83 | - Navigator.of(context).push( | ||
| 84 | - MaterialPageRoute( | ||
| 85 | - builder: (context) => const BarcodeScannerPageView(), | ||
| 86 | - ), | ||
| 87 | - ); | ||
| 88 | - }, | ||
| 89 | - child: const Text('MobileScanner pageView'), | ||
| 90 | - ), | ||
| 91 | - ElevatedButton( | ||
| 92 | - onPressed: () { | ||
| 93 | - Navigator.of(context).push( | ||
| 94 | - MaterialPageRoute( | ||
| 95 | - builder: (context) => BarcodeScannerWithOverlay(), | ||
| 96 | - ), | ||
| 97 | - ); | ||
| 98 | - }, | ||
| 99 | - child: const Text('MobileScanner with Overlay'), | ||
| 100 | - ), | ||
| 101 | - ], | 40 | + ElevatedButton( |
| 41 | + onPressed: () { | ||
| 42 | + Navigator.of(context).push( | ||
| 43 | + MaterialPageRoute( | ||
| 44 | + builder: (context) => const BarcodeScannerWithController(), | ||
| 45 | + ), | ||
| 46 | + ); | ||
| 47 | + }, | ||
| 48 | + child: const Text('MobileScanner with Controller'), | ||
| 49 | + ), | ||
| 50 | + ElevatedButton( | ||
| 51 | + onPressed: () { | ||
| 52 | + Navigator.of(context).push( | ||
| 53 | + MaterialPageRoute( | ||
| 54 | + builder: (context) => const BarcodeScannerWithScanWindow(), | ||
| 55 | + ), | ||
| 56 | + ); | ||
| 57 | + }, | ||
| 58 | + child: const Text('MobileScanner with ScanWindow'), | ||
| 59 | + ), | ||
| 60 | + ElevatedButton( | ||
| 61 | + onPressed: () { | ||
| 62 | + Navigator.of(context).push( | ||
| 63 | + MaterialPageRoute( | ||
| 64 | + builder: (context) => const BarcodeScannerReturningImage(), | ||
| 65 | + ), | ||
| 66 | + ); | ||
| 67 | + }, | ||
| 68 | + child: const Text( | ||
| 69 | + 'MobileScanner with Controller (returning image)', | ||
| 70 | + ), | ||
| 71 | + ), | ||
| 72 | + ElevatedButton( | ||
| 73 | + onPressed: () { | ||
| 74 | + Navigator.of(context).push( | ||
| 75 | + MaterialPageRoute( | ||
| 76 | + builder: (context) => const BarcodeScannerWithZoom(), | ||
| 77 | + ), | ||
| 78 | + ); | ||
| 79 | + }, | ||
| 80 | + child: const Text('MobileScanner with zoom slider'), | ||
| 81 | + ), | ||
| 82 | + ElevatedButton( | ||
| 83 | + onPressed: () { | ||
| 84 | + Navigator.of(context).push( | ||
| 85 | + MaterialPageRoute( | ||
| 86 | + builder: (context) => const BarcodeScannerPageView(), | ||
| 87 | + ), | ||
| 88 | + ); | ||
| 89 | + }, | ||
| 90 | + child: const Text('MobileScanner pageView'), | ||
| 91 | + ), | ||
| 92 | + ElevatedButton( | ||
| 93 | + onPressed: () { | ||
| 94 | + Navigator.of(context).push( | ||
| 95 | + MaterialPageRoute( | ||
| 96 | + builder: (context) => BarcodeScannerWithOverlay(), | ||
| 97 | + ), | ||
| 98 | + ); | ||
| 99 | + }, | ||
| 100 | + child: const Text('MobileScanner with Overlay'), | ||
| 101 | + ), | ||
| 102 | + ], | ||
| 103 | + ), | ||
| 102 | ), | 104 | ), |
| 103 | ); | 105 | ); |
| 104 | } | 106 | } |
-
Please register or login to post a comment