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