Browse Source

safety

master
fmk 3 years ago
parent
commit
3d4430f5ef
  1. 2
      lib/mine/mine_view/mine_view.dart
  2. 18
      lib/qr/qr_code_scan.dart
  3. 3
      lib/store/store_view/store_order_page.dart

2
lib/mine/mine_view/mine_view.dart

@ -36,7 +36,7 @@ class _MineView extends State<MineView> {
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
// toScan(); toScan();
}, },
child: Container( child: Container(
padding: EdgeInsets.all(8.h), padding: EdgeInsets.all(8.h),

18
lib/qr/qr_code_scan.dart

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

3
lib/store/store_view/store_order_page.dart

@ -76,6 +76,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
width: MediaQuery.of(context).size.width - 100.w, width: MediaQuery.of(context).size.width - 100.w,
child: ListView.builder( child: ListView.builder(
itemCount: 15, itemCount: 15,
padding: EdgeInsets.only(top: 25, bottom: 50),
// controller: widget.controller, // controller: widget.controller,
itemBuilder: (context, position) { itemBuilder: (context, position) {
return goodsItem(); return goodsItem();
@ -97,7 +98,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
GestureDetector( GestureDetector(
onTap: () { onTap:() {
setState(() { setState(() {
isSelected = index; isSelected = index;
}); });

Loading…
Cancel
Save