Navaron Bracke

remove the builder from the controller sample

@@ -50,9 +50,7 @@ class _BarcodeScannerWithControllerState @@ -50,9 +50,7 @@ class _BarcodeScannerWithControllerState
50 return Scaffold( 50 return Scaffold(
51 appBar: AppBar(title: const Text('With controller')), 51 appBar: AppBar(title: const Text('With controller')),
52 backgroundColor: Colors.black, 52 backgroundColor: Colors.black,
53 - body: Builder(  
54 - builder: (context) {  
55 - return Stack( 53 + body: Stack(
56 children: [ 54 children: [
57 MobileScanner( 55 MobileScanner(
58 controller: controller, 56 controller: controller,
@@ -78,8 +76,7 @@ class _BarcodeScannerWithControllerState @@ -78,8 +76,7 @@ class _BarcodeScannerWithControllerState
78 height: 50, 76 height: 50,
79 child: FittedBox( 77 child: FittedBox(
80 child: Text( 78 child: Text(
81 - barcode?.barcodes.first.rawValue ??  
82 - 'Scan something!', 79 + barcode?.barcodes.first.rawValue ?? 'Scan something!',
83 overflow: TextOverflow.fade, 80 overflow: TextOverflow.fade,
84 style: Theme.of(context) 81 style: Theme.of(context)
85 .textTheme 82 .textTheme
@@ -96,8 +93,6 @@ class _BarcodeScannerWithControllerState @@ -96,8 +93,6 @@ class _BarcodeScannerWithControllerState
96 ), 93 ),
97 ), 94 ),
98 ], 95 ],
99 - );  
100 - },  
101 ), 96 ),
102 ); 97 );
103 } 98 }