Browse Source

更改

master
w-R 3 years ago
parent
commit
1f8c1ae435
  1. 3
      lib/main.dart
  2. 1
      lib/order/order_detail_page.dart
  3. 46
      lib/order/order_view/order_address.dart
  4. 10
      lib/order/order_view/order_commodity.dart
  5. 758
      lib/store/store_order.dart

3
lib/main.dart

@ -52,6 +52,7 @@ import 'package:huixiang/setting/help_feedback_page.dart';
import 'package:huixiang/setting/permission_setting_page.dart'; import 'package:huixiang/setting/permission_setting_page.dart';
import 'package:huixiang/setting/setting_page.dart'; import 'package:huixiang/setting/setting_page.dart';
import 'package:huixiang/setting/treaty_page.dart'; import 'package:huixiang/setting/treaty_page.dart';
import 'package:huixiang/store/settlement.dart';
import 'package:huixiang/store/store_order.dart'; import 'package:huixiang/store/store_order.dart';
import 'package:huixiang/union/location_map_page.dart'; import 'package:huixiang/union/location_map_page.dart';
@ -261,6 +262,8 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
'/router/order_history_page': (context, {arguments}) => OrderHistoryPage(arguments: arguments), '/router/order_history_page': (context, {arguments}) => OrderHistoryPage(arguments: arguments),
'/router/order_details': (context, {arguments}) => '/router/order_details': (context, {arguments}) =>
OrderDetailPage(arguments: arguments), OrderDetailPage(arguments: arguments),
'/router/settlement': (context, {arguments}) =>
Settlement(arguments: arguments),
'/router/recharge_page': (context, {arguments}) => RechargePage(), '/router/recharge_page': (context, {arguments}) => RechargePage(),
'/router/hot_article_page': (context, {arguments}) => HotArticlePage(), '/router/hot_article_page': (context, {arguments}) => HotArticlePage(),
'/router/address_edit_page': (context, {arguments}) => '/router/address_edit_page': (context, {arguments}) =>

1
lib/order/order_detail_page.dart

@ -125,7 +125,6 @@ class _OrderDetailPage extends State<OrderDetailPage> {
/// ///
OrderStatus(orderStatus, isTakeOut, sendStatus, payStatus, OrderStatus(orderStatus, isTakeOut, sendStatus, payStatus,
refundStatus, title, center, orderInfo), refundStatus, title, center, orderInfo),
/// ///
OrderAddress( OrderAddress(
orderStatus, orderStatus,

46
lib/order/order_view/order_address.dart

@ -1,5 +1,3 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
@ -12,8 +10,6 @@ import 'package:huixiang/view_widget/text_image_dialog.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class OrderAddress extends StatefulWidget { class OrderAddress extends StatefulWidget {
final int orderStatus; final int orderStatus;
final int isTakeOut; final int isTakeOut;
final int sendStatus; final int sendStatus;
@ -24,14 +20,21 @@ class OrderAddress extends StatefulWidget {
final Function orderCancel; final Function orderCancel;
final OrderInfo orderInfo; final OrderInfo orderInfo;
OrderAddress(this.orderStatus, this.isTakeOut, this.sendStatus, this.payStatus, this.refundStatus, this.title, this.center, this.orderCancel, this.orderInfo); OrderAddress(
this.orderStatus,
this.isTakeOut,
this.sendStatus,
this.payStatus,
this.refundStatus,
this.title,
this.center,
this.orderCancel,
this.orderInfo);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
return _OrderAddress(); return _OrderAddress();
} }
} }
class _OrderAddress extends State<OrderAddress> { class _OrderAddress extends State<OrderAddress> {
@ -63,11 +66,12 @@ class _OrderAddress extends State<OrderAddress> {
height: 28.h, height: 28.h,
), ),
Text( Text(
(widget.orderInfo != null && widget.orderInfo.addressExt != null) (widget.orderInfo != null &&
widget.orderInfo.addressExt != null)
? ((widget.isTakeOut == 0 ? ((widget.isTakeOut == 0
? widget.orderInfo.storeName ? widget.orderInfo.storeName
: widget.orderInfo.addressExt.recName) ?? : widget.orderInfo.addressExt.recName) ??
"") "")
: "", : "",
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
@ -80,7 +84,8 @@ class _OrderAddress extends State<OrderAddress> {
), ),
Expanded( Expanded(
child: Text( child: Text(
(widget.orderInfo != null && widget.orderInfo.addressExt != null) (widget.orderInfo != null &&
widget.orderInfo.addressExt != null)
? (widget.orderInfo.addressExt.recMobile ?? "") ? (widget.orderInfo.addressExt.recMobile ?? "")
: "", : "",
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
@ -138,10 +143,10 @@ class _OrderAddress extends State<OrderAddress> {
S.of(context).ruxutuikuanqingyumendianlianxi, S.of(context).ruxutuikuanqingyumendianlianxi,
"", "",
S.of(context).zhidianmendian, S.of(context).zhidianmendian,
(open) { (open) {
if (open) { if (open) {
String mobile = (widget.orderInfo != null && String mobile = (widget.orderInfo != null &&
widget.orderInfo.storeVO != null) widget.orderInfo.storeVO != null)
? (widget.orderInfo.storeVO.mobile ?? "") ? (widget.orderInfo.storeVO.mobile ?? "")
: ""; : "";
if (mobile != "") { if (mobile != "") {
@ -190,12 +195,12 @@ class _OrderAddress extends State<OrderAddress> {
if (widget.payStatus == 0) { if (widget.payStatus == 0) {
carryOnPay(); carryOnPay();
} else { } else {
String storeId = String storeId = (widget.orderInfo != null &&
(widget.orderInfo != null && widget.orderInfo.storeVO != null) widget.orderInfo.storeVO != null)
? (widget.orderInfo.storeVO.id ?? "") ? (widget.orderInfo.storeVO.id ?? "")
: ""; : "";
String storeName = String storeName = (widget.orderInfo != null &&
(widget.orderInfo != null && widget.orderInfo.storeVO != null) widget.orderInfo.storeVO != null)
? (widget.orderInfo.storeVO.storeName ?? "") ? (widget.orderInfo.storeVO.storeName ?? "")
: ""; : "";
aginOrder(storeId, storeName); aginOrder(storeId, storeName);
@ -237,7 +242,6 @@ class _OrderAddress extends State<OrderAddress> {
); );
} }
callMobile(mobile) async { callMobile(mobile) async {
String url = "tel:$mobile"; String url = "tel:$mobile";
if (await canLaunch(url)) { if (await canLaunch(url)) {
@ -325,6 +329,4 @@ class _OrderAddress extends State<OrderAddress> {
}, },
); );
} }
}
}

10
lib/order/order_view/order_commodity.dart

@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/order_info.dart'; import 'package:huixiang/retrofit/data/order_info.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/separator.dart'; import 'package:huixiang/view_widget/separator.dart';
@ -90,7 +91,7 @@ class _OrderCommodity extends State<OrderCommodity> {
widget.orderInfo.orderDetail.couponDTO != null) { widget.orderInfo.orderDetail.couponDTO != null) {
// //
widgets.add(discountItem( widgets.add(discountItem(
Color(0xFF32A060), Color(0xFFFF7A1A),
S.of(context).youhuiquan, S.of(context).youhuiquan,
widget.orderInfo.orderDetail.couponDTO.name, widget.orderInfo.orderDetail.couponDTO.name,
widget.orderInfo.orderDetail.couponDTO.money)); widget.orderInfo.orderDetail.couponDTO.money));
@ -335,6 +336,7 @@ class _OrderCommodity extends State<OrderCommodity> {
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 10.sp,
color: Color(0xFFA29E9E), color: Color(0xFFA29E9E),
fontWeight: MyFontWeight.semi_bold
), ),
), ),
flex: 1, flex: 1,
@ -343,8 +345,9 @@ class _OrderCommodity extends State<OrderCommodity> {
child: Text( child: Text(
S.of(context).jiesuanjine, S.of(context).jiesuanjine,
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 12.sp,
color: Color(0xFF353535), color: Color(0xFF353535),
fontWeight:MyFontWeight.semi_bold
), ),
), ),
), ),
@ -355,8 +358,9 @@ class _OrderCommodity extends State<OrderCommodity> {
totalPrice(), totalPrice(),
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: TextStyle( style: TextStyle(
fontSize: 30.sp, fontSize:14.sp,
color: Color(0xFF32A060), color: Color(0xFF32A060),
fontWeight: MyFontWeight.semi_bold
), ),
) )
], ],

758
lib/store/store_order.dart

@ -32,10 +32,11 @@ class StoreOrderPage extends StatefulWidget {
} }
} }
class testModel{ class testModel {
String name; String name;
bool isSelected; bool isSelected;
testModel(String name){
testModel(String name) {
this.name = name; this.name = name;
this.isSelected = false; this.isSelected = false;
} }
@ -47,10 +48,15 @@ class _StoreOrderPage extends State<StoreOrderPage>
ApiService apiService; ApiService apiService;
StoreInfo storeInfo; StoreInfo storeInfo;
RefreshController refreshController; RefreshController refreshController;
List<testModel> temperatureStoreList = [testModel("正常冰"),testModel("少冰"),testModel("多冰"),testModel("去冰")]; List<testModel> temperatureStoreList = [
List<testModel> sweetnessStoreList = [testModel("正常糖"),testModel("5分糖")]; testModel("正常冰"),
testModel("少冰"),
testModel("多冰"),
testModel("去冰")
];
List<testModel> sweetnessStoreList = [testModel("正常糖"), testModel("5分糖")];
int isSelected = 0; int isSelected = 0;
int isChoice =0; int isChoice = 0;
int tempClickIndex = 0; int tempClickIndex = 0;
@override @override
@ -253,14 +259,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
color: Colors.black, color: Colors.black,
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: 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, controller: tabcontroller,
@ -300,15 +298,13 @@ class _StoreOrderPage extends State<StoreOrderPage>
), ),
Spacer(), Spacer(),
GestureDetector( GestureDetector(
onTap: (){ onTap: () {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
'/router/settlement', '/router/settlement',
arguments: { arguments: {},
},
); );
}, },
child:RoundButton( child: RoundButton(
width: 103.w, width: 103.w,
height: 54.h, height: 54.h,
text: S.current.jiesuan, text: S.current.jiesuan,
@ -319,42 +315,40 @@ class _StoreOrderPage extends State<StoreOrderPage>
padding: EdgeInsets.symmetric(vertical: 5.h), padding: EdgeInsets.symmetric(vertical: 5.h),
), ),
), ),
], ],
), ),
), ),
Stack( Stack(
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
showShoppingCart(); showShoppingCart();
}); });
}, },
child: Image.asset( child: Image.asset(
"assets/image/shopp.png", "assets/image/shopp.png",
width: 88, width: 88,
height: 88, height: 88,
), ),
), ),
Positioned( Positioned(
right: 15, right: 15,
top: 14, top: 14,
child: RoundButton( child: RoundButton(
width: 17, width: 17,
height: 17, height: 17,
text: "1", text: "1",
textColor: Colors.white, textColor: Colors.white,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060), backgroup: Color(0xFF32A060),
fontSize: 12.sp, fontSize: 12.sp,
radius: 100, radius: 100,
// padding: EdgeInsets.symmetric(vertical: 5.h), // padding: EdgeInsets.symmetric(vertical: 5.h),
), ),
) )
], ],
), ),
], ],
), ),
) )
@ -362,17 +356,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
); );
} }
///
Widget starGoodsItem() { Widget starGoodsItem() {
return Container(
child: Text(
S.of(context).xindianhuodong,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold,
color: Colors.black,
),
),
);
return Container( return Container(
child: Swiper( child: Swiper(
viewportFraction: 0.95, viewportFraction: 0.95,
@ -502,6 +487,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
); );
} }
///
Widget order() { Widget order() {
return Container( return Container(
width: double.infinity, width: double.infinity,
@ -760,205 +746,211 @@ class _StoreOrderPage extends State<StoreOrderPage>
context: context, context: context,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
builder: (context) { builder: (context) {
return StatefulBuilder( return StatefulBuilder(builder: (context1, state) {
builder:(context1, state) { return Container(
return Container( alignment: Alignment.topCenter,
alignment: Alignment.topCenter, padding: EdgeInsets.only(top: 16, left: 16, right: 16),
padding: EdgeInsets.only(top: 16, left: 16, right: 16), width: double.infinity,
width: double.infinity, decoration: BoxDecoration(
decoration: BoxDecoration( color: Color(0xFFFAFAFA),
color: Color(0xFFFAFAFA), borderRadius: BorderRadius.only(
borderRadius: BorderRadius.only( topLeft: Radius.circular(8), topRight: Radius.circular(8)),
topLeft: Radius.circular(8), topRight: Radius.circular(8)), ),
), child: Column(
child: Column( mainAxisAlignment: MainAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Row(
Row( mainAxisAlignment: MainAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ MImage(
MImage( "",
"", width: 70,
width: 70, height: 70,
height: 70, fit: BoxFit.cover,
fit: BoxFit.cover, errorSrc: "assets/image/default_1.png",
errorSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png", ),
), SizedBox(width: 10),
SizedBox(width: 10), Column(
Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Text(
Text( "手工啵啵奶茶",
"手工啵啵奶茶",
style: TextStyle(
color: Colors.black,
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
),
),
Padding(
padding: EdgeInsets.only(top: 4, bottom: 7),
child: Text(
"已选:正常冰",
style: TextStyle( style: TextStyle(
color: Color(0xFF727272), color: Colors.black,
fontSize: 11.sp, fontSize: 16.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.medium,
), ),
), ),
), Padding(
Row( padding: EdgeInsets.only(top: 4, bottom: 7),
children: [ child: Text(
Text( "已选:正常冰",
"会员价",
style: TextStyle( style: TextStyle(
color: Color(0xFFFF7A1A), color: Color(0xFF727272),
fontSize: 13.sp, fontSize: 11.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.regular,
), ),
), ),
Text( ),
"¥19.00", Row(
style: TextStyle( children: [
color: Color(0xFFFF7A1A), Text(
fontSize: 14.sp, "会员价",
fontWeight: MyFontWeight.medium, style: TextStyle(
color: Color(0xFFFF7A1A),
fontSize: 13.sp,
fontWeight: MyFontWeight.medium,
),
), ),
) Text(
], "¥19.00",
style: TextStyle(
color: Color(0xFFFF7A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
),
)
],
),
],
),
Spacer(),
InkWell(
onTap: () {
Navigator.of(context).pop();
},
child: Image.asset(
"assets/image/cancel.png",
width: 22,
height: 22,
), ),
],
),
Spacer(),
InkWell(
onTap: () {
Navigator.of(context).pop();
},
child: Image.asset(
"assets/image/cancel.png",
width: 22,
height: 22,
), ),
],
),
SizedBox(
height: 23,
),
Text(
"温度",
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
), ),
],
),
SizedBox(
height: 23,
),
Text(
"温度",
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
), ),
), SizedBox(
SizedBox( height: 15,
height: 15,
),
sweetnessStore((){state((){
for(var i = 0;i < temperatureStoreList.length;i++){
if(tempClickIndex == i)
temperatureStoreList[i].isSelected = true;
else temperatureStoreList[i].isSelected = false;
}
});},temperatureStoreList),
SizedBox(
height: 24,
),
Text(
"甜度",
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
), ),
), sweetnessStore(() {
SizedBox( state(() {
height: 15, for (var i = 0; i < temperatureStoreList.length; i++) {
), if (tempClickIndex == i)
sweetnessStore((){state((){ temperatureStoreList[i].isSelected = true;
for(var i = 0;i < sweetnessStoreList.length;i++){ else
if(tempClickIndex == i) temperatureStoreList[i].isSelected = false;
sweetnessStoreList[i].isSelected = true; }
else sweetnessStoreList[i].isSelected = false; });
} }, temperatureStoreList),
});},sweetnessStoreList), SizedBox(
SizedBox( height: 24,
height: 24, ),
), Text(
Row( "甜度",
mainAxisAlignment: MainAxisAlignment.center, style: TextStyle(
children: [ color: Colors.black,
Expanded(child: Text( fontSize: 14.sp,
"数量", fontWeight: MyFontWeight.regular,
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
))
,
InkWell(
onTap: () {},
child: Image.asset(
"assets/image/reduce.png",
width: 22,
height: 22,
),
), ),
Padding( ),
padding: EdgeInsets.only(left: 8, right: 8), SizedBox(
child: Text( height: 15,
"1", ),
sweetnessStore(() {
state(() {
for (var i = 0; i < sweetnessStoreList.length; i++) {
if (tempClickIndex == i)
sweetnessStoreList[i].isSelected = true;
else
sweetnessStoreList[i].isSelected = false;
}
});
}, sweetnessStoreList),
SizedBox(
height: 24,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Text(
"数量",
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.regular,
),
)),
InkWell(
onTap: () {},
child: Image.asset(
"assets/image/reduce.png",
width: 22,
height: 22,
), ),
), ),
), Padding(
InkWell( padding: EdgeInsets.only(left: 8, right: 8),
onTap: () {}, child: Text(
child: Image.asset( "1",
"assets/image/add.png", style: TextStyle(
width: 22, color: Colors.black,
height: 22, fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
),
),
), ),
), InkWell(
], onTap: () {},
), child: Image.asset(
SizedBox( "assets/image/add.png",
height: 24, width: 22,
), height: 22,
RoundButton( ),
width:double.infinity, ),
height: 54.h, ],
text: "加入购物车", ),
textColor: Colors.white, SizedBox(
fontWeight: MyFontWeight.semi_bold, height: 24,
radius:27, ),
backgroup: Color(0xFF32A060), RoundButton(
fontSize: 16.sp, width: double.infinity,
// padding: EdgeInsets.symmetric(vertical: 5.h), height: 54.h,
), text: "加入购物车",
], textColor: Colors.white,
), fontWeight: MyFontWeight.semi_bold,
);}); radius: 27,
backgroup: Color(0xFF32A060),
fontSize: 16.sp,
// padding: EdgeInsets.symmetric(vertical: 5.h),
),
],
),
);
});
}, },
); );
} }
Widget sweetnessStore(Function fc,List<testModel> arrays) { Widget sweetnessStore(Function fc, List<testModel> arrays) {
return GridView.builder( return GridView.builder(
itemCount:arrays.length, itemCount: arrays.length,
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
//Widget数量 //Widget数量
crossAxisCount: 4, crossAxisCount: 4,
//Widget之间间距 //Widget之间间距
crossAxisSpacing: 6.w, crossAxisSpacing: 6.w,
@ -968,17 +960,17 @@ class _StoreOrderPage extends State<StoreOrderPage>
childAspectRatio: 3 / 1), childAspectRatio: 3 / 1),
itemBuilder: (contetx, index) { itemBuilder: (contetx, index) {
return GestureDetector( return GestureDetector(
onTap: (){ onTap: () {
tempClickIndex = index; tempClickIndex = index;
fc(); fc();
}, },
child: sweetnessItem(arrays[index].name,arrays[index].isSelected), child: sweetnessItem(arrays[index].name, arrays[index].isSelected),
); );
}, },
); );
} }
Widget sweetnessItem(String name,bool isCheck) { Widget sweetnessItem(String name, bool isCheck) {
return Container( return Container(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
@ -988,10 +980,10 @@ class _StoreOrderPage extends State<StoreOrderPage>
width: 68.w, width: 68.w,
height: 29.h, height: 29.h,
text: name, text: name,
textColor: !isCheck ?Color(0xFF727272):Colors.white, textColor: !isCheck ? Color(0xFF727272) : Colors.white,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
radius: 4, radius: 4,
backgroup:!isCheck ? Color(0xFFE5E5E5):Color(0xFF32A060), backgroup: !isCheck ? Color(0xFFE5E5E5) : Color(0xFF32A060),
fontSize: 12.sp, fontSize: 12.sp,
), ),
], ],
@ -1005,144 +997,143 @@ class _StoreOrderPage extends State<StoreOrderPage>
context: context, context: context,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
builder: (context) { builder: (context) {
return StatefulBuilder( return StatefulBuilder(builder: (context1, state) {
builder:(context1, state) { return Container(
return Container( alignment: Alignment.topCenter,
alignment: Alignment.topCenter, width: double.infinity,
width: double.infinity, decoration: BoxDecoration(
decoration: BoxDecoration( color: Color(0xFFFAFAFA),
color: Color(0xFFFAFAFA), borderRadius: BorderRadius.only(
borderRadius: BorderRadius.only( topLeft: Radius.circular(8), topRight: Radius.circular(8)),
topLeft: Radius.circular(8), topRight: Radius.circular(8)), ),
), child: Stack(
child: Stack( children: [
children: [ Container(
Container( padding: EdgeInsets.only(top: 16, left: 16, right: 16),
padding: EdgeInsets.only(top: 16, left: 16, right: 16), child: Column(
child:Column( mainAxisAlignment: MainAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Text(
mainAxisAlignment: MainAxisAlignment.spaceBetween, "已选商品",
crossAxisAlignment: CrossAxisAlignment.start, style: TextStyle(
children: [ color: Colors.black,
Text( fontSize: 14.sp,
"已选商品", fontWeight: MyFontWeight.medium,
style: TextStyle( ),
color: Colors.black, ),
fontSize: 14.sp, InkWell(
fontWeight: MyFontWeight.medium, onTap: () {},
), child: Image.asset(
), "assets/image/delete.png",
InkWell( width: 22,
onTap: () { height: 22,
}, ),
child: Image.asset(
"assets/image/delete.png",
width: 22,
height: 22,
),
),
],
), ),
SizedBox(height: 24.h),
Expanded(child:
Container(
child: ListView.builder(
itemCount: 10,
shrinkWrap: true,
// physics:NeverScrollableScrollPhysics(),
itemBuilder: (context, position) {
return shoppGoodsItem();
}),
),)
], ],
), ),
), SizedBox(height: 24.h),
Positioned( Expanded(
bottom: 0, child: Container(
left: 0, child: ListView.builder(
right: 0, itemCount: 10,
child: Stack( shrinkWrap: true,
alignment: Alignment.bottomLeft, // physics:NeverScrollableScrollPhysics(),
children: [ itemBuilder: (context, position) {
Container( return shoppGoodsItem();
height: 54.h, }),
color: Color(0xFFFAFAFA), ),
child: Row( )
// mainAxisAlignment: MainAxisAlignment.end, ],
// crossAxisAlignment: CrossAxisAlignment.end, ),
children: [ ),
Spacer(), Positioned(
Text( bottom: 0,
S.of(context).heji, left: 0,
style: TextStyle( right: 0,
fontSize: 12.sp, child: Stack(
fontWeight: MyFontWeight.regular, alignment: Alignment.bottomLeft,
color: Colors.black, children: [
), Container(
), height: 54.h,
Text( color: Color(0xFFFAFAFA),
"¥19.00", child: Row(
style: TextStyle( // mainAxisAlignment: MainAxisAlignment.end,
fontSize: 20.sp, // crossAxisAlignment: CrossAxisAlignment.end,
fontWeight: MyFontWeight.medium, children: [
color: Color(0xFF32A060), Spacer(),
), Text(
), S.of(context).heji,
Spacer(), style: TextStyle(
RoundButton( fontSize: 12.sp,
width: 103.w, fontWeight: MyFontWeight.regular,
height: 54.h, color: Colors.black,
text: S.current.jiesuan, ),
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060),
fontSize: 16.sp,
padding: EdgeInsets.symmetric(vertical: 5.h),
)
],
), ),
), Text(
Stack( "¥19.00",
children: [ style: TextStyle(
InkWell( fontSize: 20.sp,
onTap: () { fontWeight: MyFontWeight.medium,
setState(() { color: Color(0xFF32A060),
Navigator.of(context).pop();
});
},
child: Image.asset(
"assets/image/shopp.png",
width: 88,
height: 88,
),
), ),
Positioned( ),
right: 15, Spacer(),
top: 14, RoundButton(
child: RoundButton( width: 103.w,
width: 17, height: 54.h,
height: 17, text: S.current.jiesuan,
text: "1", textColor: Colors.white,
textColor: Colors.white, fontWeight: MyFontWeight.regular,
fontWeight: MyFontWeight.regular, backgroup: Color(0xFF32A060),
backgroup: Color(0xFF32A060), fontSize: 16.sp,
fontSize: 12.sp, padding: EdgeInsets.symmetric(vertical: 5.h),
radius: 100, )
// padding: EdgeInsets.symmetric(vertical: 5.h), ],
), ),
) ),
], Stack(
children: [
InkWell(
onTap: () {
setState(() {
Navigator.of(context).pop();
});
},
child: Image.asset(
"assets/image/shopp.png",
width: 88,
height: 88,
),
), ),
Positioned(
right: 15,
top: 14,
child: RoundButton(
width: 17,
height: 17,
text: "1",
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060),
fontSize: 12.sp,
radius: 100,
// padding: EdgeInsets.symmetric(vertical: 5.h),
),
)
], ],
), ),
) ],
], ),
), )
);}); ],
),
);
});
}, },
); );
} }
@ -1155,7 +1146,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
MImage( MImage(
"assets/image/default_1.png", "assets/image/default_1.png",
width: 60, width: 60,
height:60, height: 60,
fit: BoxFit.cover, fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png", errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png",
@ -1195,7 +1186,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
) )
], ],
), ),
SizedBox(height:6), SizedBox(height: 6),
Row( Row(
children: [ children: [
Column( Column(
@ -1232,25 +1223,25 @@ class _StoreOrderPage extends State<StoreOrderPage>
height: 22, height: 22,
), ),
), ),
Padding( Padding(
padding: EdgeInsets.only(left: 8, right: 8), padding: EdgeInsets.only(left: 8, right: 8),
child: Text( child: Text(
"1", "1",
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
),
), ),
), ),
InkWell( ),
onTap: () {}, InkWell(
child: Image.asset( onTap: () {},
"assets/image/add.png", child: Image.asset(
width: 22, "assets/image/add.png",
height: 22, width: 22,
), height: 22,
), ),
),
], ],
), ),
], ],
@ -1261,7 +1252,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
); );
} }
// @override // @override
// bool get wantKeepAlive => true; // bool get wantKeepAlive => true;
} }

Loading…
Cancel
Save