Browse Source

vip规则弹窗更改

dart3_last
wurong 2 years ago
parent
commit
698bb28c8b
  1. 134
      lib/vip/vip_view/exclusive_coupon.dart
  2. 73
      lib/vip/vip_view/vip_goods_discount.dart

134
lib/vip/vip_view/exclusive_coupon.dart

@ -19,7 +19,8 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
return Container(
margin: EdgeInsets.only(left: 14.w, right: 14.w, bottom: 40.h),
width: double.infinity,
padding: EdgeInsets.only(top: 20.h,left: 20.h,bottom: 10.h,right: 20.w),
padding:
EdgeInsets.only(top: 20.h, left: 20.h, bottom: 10.h, right: 20.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.w),
color: Colors.white,
@ -38,14 +39,18 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
children: [
Row(
children: [
SizedBox(width: 7.w,),
SizedBox(
width: 7.w,
),
Image.asset(
"assets/image/vip_title.webp",
fit: BoxFit.fill, //
height: 13.h,
width: 27.w,
),
SizedBox(width: 4.w,),
SizedBox(
width: 4.w,
),
Text(
S.of(context).zhuanxiangyouhuiquan,
style: TextStyle(
@ -60,7 +65,8 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
showAlertDialog();
},
child: Container(
padding: EdgeInsets.only(left: 8.w,right:30.w,top: 3.h,bottom: 3.h),
padding: EdgeInsets.only(
left: 8.w, right: 30.w, top: 3.h, bottom: 3.h),
child: Image.asset(
"assets/image/vip_tips.webp",
fit: BoxFit.fill, //
@ -90,7 +96,8 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child:Padding(
Expanded(
child: Padding(
padding: EdgeInsets.only(top: 25.h, left: 19.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
@ -104,7 +111,9 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
fontWeight: MyFontWeight.semi_bold,
),
),
SizedBox(height: 5.h,),
SizedBox(
height: 5.h,
),
Text.rich(
TextSpan(
children: [
@ -130,7 +139,8 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
textDirection: TextDirection.ltr,
),
],
),)),
),
)),
Image.asset(
"assets/image/vip_shop_hx.webp",
fit: BoxFit.fill, //
@ -159,7 +169,8 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child:Padding(
Expanded(
child: Padding(
padding: EdgeInsets.only(top: 25.h, left: 19.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
@ -173,7 +184,9 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
fontWeight: MyFontWeight.semi_bold,
),
),
SizedBox(height: 5.h,),
SizedBox(
height: 5.h,
),
Text.rich(
TextSpan(
children: [
@ -199,7 +212,8 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
textDirection: TextDirection.ltr,
),
],
),)),
),
)),
Image.asset(
"assets/image/vip_shop_qj.webp",
fit: BoxFit.fill, //
@ -228,7 +242,8 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child:Padding(
Expanded(
child: Padding(
padding: EdgeInsets.only(top: 25.h, left: 19.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
@ -242,7 +257,9 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
fontWeight: MyFontWeight.semi_bold,
),
),
SizedBox(height: 5.h,),
SizedBox(
height: 5.h,
),
Text.rich(
TextSpan(
children: [
@ -268,7 +285,8 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
textDirection: TextDirection.ltr,
),
],
),)),
),
)),
Image.asset(
"assets/image/vip_shop_hg.webp",
fit: BoxFit.fill, //
@ -288,68 +306,41 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
///
showAlertDialog() {
//
showDialog(
context: context,
showModalBottomSheet(
builder: (BuildContext context) {
return SimpleDialog(
backgroundColor: Colors.transparent,
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),
),
children: <Widget>[
return StatefulBuilder(builder: (
context,
state,
) {
return WillPopScope(
///
// onWillPop: () async => false,
child:Stack(
alignment: Alignment.topRight,
children: [
Container(
width: double.infinity,
height:470.h,
padding: EdgeInsets.only(left: 14.w,right: 14.w,bottom: 16.h),
height: 370.h,
padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 16.h),
decoration: new BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
),
child: Scaffold(
appBar: MyAppBar(
title:"",
titleColor: Colors.black,
titleSize: 10.sp,
background: Colors.white,
leadingColor: Colors.white,
actions: [
GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Icon(
Icons.clear,
color: Colors.black,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
topRight: Radius.circular(8),
),
)
],
),
body: Container(
color: Colors.white,
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
child:Column(
padding: EdgeInsets.only(right: 18.w),
child:
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Row(
// children: [
// Spacer(),
// GestureDetector(
// onTap: () {
// Navigator.of(context).pop();
// },
// child: Icon(
// Icons.clear,
// color: Colors.black,
// ),
// )
// ],
// ),
SizedBox(height: 10.h,),
SizedBox(
height: 10.h,
),
Text(
"VIP会员专享优惠券:"
"\n ①海峡姐妹饮品券"
@ -375,17 +366,28 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
color: Colors.black,
),
),
SizedBox(height: 15.h,)
],
),
),
),
),
GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
margin: EdgeInsets.only(right: 14.w,top: 16.h),
child: Image.asset(
"assets/image/cancel.webp",
width: 24,
height: 24,
),
),
],
);
)],
));
});
},
);
backgroundColor: Colors.transparent,
context: context);
}
}

73
lib/vip/vip_view/vip_goods_discount.dart

@ -8,7 +8,6 @@ import '../../retrofit/data/vip_card_home.dart';
import '../../utils/flutter_utils.dart';
import '../../view_widget/custom_image.dart';
class VipGoodsDiscount extends StatefulWidget {
final VipCardHome vipCardHome;
@ -215,8 +214,7 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
Container(
// width:53.w,
// alignment: Alignment.center,
padding:
EdgeInsets.symmetric(vertical: 2.h, horizontal:8.w),
padding: EdgeInsets.symmetric(vertical: 2.h, horizontal: 8.w),
margin: EdgeInsets.only(left: 5.w),
decoration: BoxDecoration(
color: Color(0xffF96519),
@ -264,7 +262,9 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
fontWeight: MyFontWeight.medium,
),
),
SizedBox(width: 4.w,),
SizedBox(
width: 4.w,
),
Text(
"${AppUtils.calculateDouble(double.tryParse(productVips.applyPrice ?? "0.00"))}",
textAlign: TextAlign.end,
@ -285,46 +285,38 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
///
showAlertDialog() {
//
showDialog(
context: context,
showModalBottomSheet(
builder: (BuildContext context) {
return SimpleDialog(
backgroundColor: Colors.transparent,
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),
),
children: <Widget>[
return StatefulBuilder(builder: (
context,
state,
) {
return WillPopScope(
///
// onWillPop: () async => false,
child: Stack(
alignment: Alignment.topRight,
children: [
Container(
width: double.infinity,
height: 470.h,
padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 16.h),
height: 370.h,
padding:
EdgeInsets.symmetric(horizontal: 14.w, vertical: 16.h),
decoration: new BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
topRight: Radius.circular(8),
),
),
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
padding: EdgeInsets.only(right: 18.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Spacer(),
GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Icon(
Icons.clear,
color: Colors.black,
),
)
],
),
SizedBox(
height: 10.h,
),
@ -345,9 +337,24 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
),
),
),
GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
margin: EdgeInsets.only(right: 14.w, top: 16.h),
child: Image.asset(
"assets/image/cancel.webp",
width: 24,
height: 24,
),
),
)
],
);
));
});
},
);
backgroundColor: Colors.transparent,
context: context);
}
}

Loading…
Cancel
Save