|
|
|
@ -35,6 +35,7 @@ class StoreOrderPage extends StatefulWidget {
|
|
|
|
|
class testModel { |
|
|
|
|
String name; |
|
|
|
|
bool isSelected; |
|
|
|
|
|
|
|
|
|
testModel(String name) { |
|
|
|
|
this.name = name; |
|
|
|
|
this.isSelected = false; |
|
|
|
@ -47,7 +48,12 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
ApiService apiService; |
|
|
|
|
StoreInfo storeInfo; |
|
|
|
|
RefreshController refreshController; |
|
|
|
|
List<testModel> temperatureStoreList = [testModel("正常冰"),testModel("少冰"),testModel("多冰"),testModel("去冰")]; |
|
|
|
|
List<testModel> temperatureStoreList = [ |
|
|
|
|
testModel("正常冰"), |
|
|
|
|
testModel("少冰"), |
|
|
|
|
testModel("多冰"), |
|
|
|
|
testModel("去冰") |
|
|
|
|
]; |
|
|
|
|
List<testModel> sweetnessStoreList = [testModel("正常糖"), testModel("5分糖")]; |
|
|
|
|
int isSelected = 0; |
|
|
|
|
int isChoice = 0; |
|
|
|
@ -253,14 +259,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
color: Colors.black, |
|
|
|
|
width: MediaQuery.of(context).size.width, |
|
|
|
|
height: MediaQuery.of(context).size.width, |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).xindianhuodong, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
color: Colors.black, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
controller: tabcontroller, |
|
|
|
@ -303,9 +301,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
onTap: () { |
|
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
|
'/router/settlement', |
|
|
|
|
arguments: { |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
arguments: {}, |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
child: RoundButton( |
|
|
|
@ -319,7 +315,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 5.h), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
@ -354,7 +349,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
@ -362,17 +356,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
///星店活动 |
|
|
|
|
Widget starGoodsItem() { |
|
|
|
|
return Container( |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).xindianhuodong, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
color: Colors.black, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
return Container( |
|
|
|
|
child: Swiper( |
|
|
|
|
viewportFraction: 0.95, |
|
|
|
@ -502,6 +487,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
///点餐 |
|
|
|
|
Widget order() { |
|
|
|
|
return Container( |
|
|
|
|
width: double.infinity, |
|
|
|
@ -760,8 +746,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
context: context, |
|
|
|
|
backgroundColor: Colors.transparent, |
|
|
|
|
builder: (context) { |
|
|
|
|
return StatefulBuilder( |
|
|
|
|
builder:(context1, state) { |
|
|
|
|
return StatefulBuilder(builder: (context1, state) { |
|
|
|
|
return Container( |
|
|
|
|
alignment: Alignment.topCenter, |
|
|
|
|
padding: EdgeInsets.only(top: 16, left: 16, right: 16), |
|
|
|
@ -859,13 +844,16 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
SizedBox( |
|
|
|
|
height: 15, |
|
|
|
|
), |
|
|
|
|
sweetnessStore((){state((){ |
|
|
|
|
sweetnessStore(() { |
|
|
|
|
state(() { |
|
|
|
|
for (var i = 0; i < temperatureStoreList.length; i++) { |
|
|
|
|
if (tempClickIndex == i) |
|
|
|
|
temperatureStoreList[i].isSelected = true; |
|
|
|
|
else temperatureStoreList[i].isSelected = false; |
|
|
|
|
else |
|
|
|
|
temperatureStoreList[i].isSelected = false; |
|
|
|
|
} |
|
|
|
|
});},temperatureStoreList), |
|
|
|
|
}); |
|
|
|
|
}, temperatureStoreList), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 24, |
|
|
|
|
), |
|
|
|
@ -880,28 +868,31 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
SizedBox( |
|
|
|
|
height: 15, |
|
|
|
|
), |
|
|
|
|
sweetnessStore((){state((){ |
|
|
|
|
sweetnessStore(() { |
|
|
|
|
state(() { |
|
|
|
|
for (var i = 0; i < sweetnessStoreList.length; i++) { |
|
|
|
|
if (tempClickIndex == i) |
|
|
|
|
sweetnessStoreList[i].isSelected = true; |
|
|
|
|
else sweetnessStoreList[i].isSelected = false; |
|
|
|
|
else |
|
|
|
|
sweetnessStoreList[i].isSelected = false; |
|
|
|
|
} |
|
|
|
|
});},sweetnessStoreList), |
|
|
|
|
}); |
|
|
|
|
}, sweetnessStoreList), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 24, |
|
|
|
|
), |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Expanded(child: Text( |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
"数量", |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Colors.black, |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
), |
|
|
|
|
)) |
|
|
|
|
, |
|
|
|
|
)), |
|
|
|
|
InkWell( |
|
|
|
|
onTap: () {}, |
|
|
|
|
child: Image.asset( |
|
|
|
@ -947,7 +938,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
);}); |
|
|
|
|
); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
@ -1005,8 +997,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
context: context, |
|
|
|
|
backgroundColor: Colors.transparent, |
|
|
|
|
builder: (context) { |
|
|
|
|
return StatefulBuilder( |
|
|
|
|
builder:(context1, state) { |
|
|
|
|
return StatefulBuilder(builder: (context1, state) { |
|
|
|
|
return Container( |
|
|
|
|
alignment: Alignment.topCenter, |
|
|
|
|
width: double.infinity, |
|
|
|
@ -1036,8 +1027,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
InkWell( |
|
|
|
|
onTap: () { |
|
|
|
|
}, |
|
|
|
|
onTap: () {}, |
|
|
|
|
child: Image.asset( |
|
|
|
|
"assets/image/delete.png", |
|
|
|
|
width: 22, |
|
|
|
@ -1047,8 +1037,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox(height: 24.h), |
|
|
|
|
Expanded(child: |
|
|
|
|
Container( |
|
|
|
|
Expanded( |
|
|
|
|
child: Container( |
|
|
|
|
child: ListView.builder( |
|
|
|
|
itemCount: 10, |
|
|
|
|
shrinkWrap: true, |
|
|
|
@ -1056,7 +1046,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
itemBuilder: (context, position) { |
|
|
|
|
return shoppGoodsItem(); |
|
|
|
|
}), |
|
|
|
|
),) |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
@ -1136,13 +1127,13 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
);}); |
|
|
|
|
); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
@ -1261,7 +1252,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @override |
|
|
|
|
// bool get wantKeepAlive => true; |
|
|
|
|
} |
|
|
|
|