|
|
|
@ -24,7 +24,7 @@ class _QrCodeScanPage extends State<QrCodeScanPage> {
|
|
|
|
|
void initState() { |
|
|
|
|
super.initState(); |
|
|
|
|
|
|
|
|
|
readerHeight = MediaQuery.of(context).size.height; |
|
|
|
|
readerHeight = 812; |
|
|
|
|
Future.delayed(Duration(seconds: 1), () { |
|
|
|
|
buildReaderView(); |
|
|
|
|
}); |
|
|
|
@ -39,12 +39,14 @@ class _QrCodeScanPage extends State<QrCodeScanPage> {
|
|
|
|
|
Positioned( |
|
|
|
|
child: qrReaderView != null |
|
|
|
|
? Column( |
|
|
|
|
children: [ |
|
|
|
|
Expanded(child: qrReaderView, flex: readerHeight.toInt(),), |
|
|
|
|
// Expanded(child: qrReaderView, flex: readerHeight,), |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child: qrReaderView, |
|
|
|
|
flex: readerHeight.toInt(), |
|
|
|
|
), |
|
|
|
|
// Expanded(child: qrReaderView, flex: readerHeight,), |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
: Container( |
|
|
|
|
width: MediaQuery.of(context).size.width, |
|
|
|
|
height: MediaQuery.of(context).size.height, |
|
|
|
@ -90,7 +92,7 @@ class _QrCodeScanPage extends State<QrCodeScanPage> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QrReaderView qrReaderView; |
|
|
|
|
double readerHeight ; |
|
|
|
|
double readerHeight; |
|
|
|
|
|
|
|
|
|
buildReaderView() async { |
|
|
|
|
double screenWidth = MediaQuery.of(context).size.width; |
|
|
|
|