From feaafe068de72213ab3d990502377c54a801826f Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 25 Feb 2021 17:38:41 +1100 Subject: [PATCH] Fix barcode widget to prevent flutter widget error --- lib/barcode.dart | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/lib/barcode.dart b/lib/barcode.dart index 319494ee..b43b2143 100644 --- a/lib/barcode.dart +++ b/lib/barcode.dart @@ -436,19 +436,22 @@ class _QRViewState extends State { return Scaffold( body: Stack( children: [ - Expanded( - flex: 4, - child: QRView( - key: qrKey, - onQRViewCreated: _onViewCreated, - overlay: QrScannerOverlayShape( - borderColor: Colors.red, - borderRadius: 10, - borderLength: 30, - borderWidth: 10, - cutOutSize: 300, - ), + Column( + children: [ + Expanded( + child: QRView( + key: qrKey, + onQRViewCreated: _onViewCreated, + overlay: QrScannerOverlayShape( + borderColor: Colors.red, + borderRadius: 10, + borderLength: 30, + borderWidth: 10, + cutOutSize: 300, + ), + ) ) + ] ), Center( child: Column(