From 3d4430f5ef1ba6e77a260e69da346585a8db0625 Mon Sep 17 00:00:00 2001 From: fmk Date: Fri, 8 Oct 2021 13:51:47 +0800 Subject: [PATCH] safety --- lib/mine/mine_view/mine_view.dart | 2 +- lib/qr/qr_code_scan.dart | 18 ++++++++++-------- lib/store/store_view/store_order_page.dart | 3 ++- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/mine/mine_view/mine_view.dart b/lib/mine/mine_view/mine_view.dart index 5364e718..f75b1af5 100644 --- a/lib/mine/mine_view/mine_view.dart +++ b/lib/mine/mine_view/mine_view.dart @@ -36,7 +36,7 @@ class _MineView extends State { children: [ InkWell( onTap: () { - // toScan(); + toScan(); }, child: Container( padding: EdgeInsets.all(8.h), diff --git a/lib/qr/qr_code_scan.dart b/lib/qr/qr_code_scan.dart index 9b3e40fb..3fae8dfd 100644 --- a/lib/qr/qr_code_scan.dart +++ b/lib/qr/qr_code_scan.dart @@ -24,7 +24,7 @@ class _QrCodeScanPage extends State { 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 { 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 { } QrReaderView qrReaderView; - double readerHeight ; + double readerHeight; buildReaderView() async { double screenWidth = MediaQuery.of(context).size.width; diff --git a/lib/store/store_view/store_order_page.dart b/lib/store/store_view/store_order_page.dart index 25dd7399..d6c27bae 100644 --- a/lib/store/store_view/store_order_page.dart +++ b/lib/store/store_view/store_order_page.dart @@ -76,6 +76,7 @@ class _StoreOrderListPage extends State { width: MediaQuery.of(context).size.width - 100.w, child: ListView.builder( itemCount: 15, + padding: EdgeInsets.only(top: 25, bottom: 50), // controller: widget.controller, itemBuilder: (context, position) { return goodsItem(); @@ -97,7 +98,7 @@ class _StoreOrderListPage extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ GestureDetector( - onTap: () { + onTap:() { setState(() { isSelected = index; });