You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
174 lines
5.0 KiB
174 lines
5.0 KiB
3 years ago
|
import 'package:flutter/material.dart';
|
||
|
import 'package:huixiang/generated/l10n.dart';
|
||
|
import 'package:huixiang/retrofit/data/settleOrderInfo.dart';
|
||
|
import 'package:huixiang/utils/font_weight.dart';
|
||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||
|
|
||
|
class ActivityCouponRemarks extends StatefulWidget {
|
||
|
final Function() couponCart;
|
||
|
final Function() activityCart;
|
||
|
final CouponListBean couponListBean;
|
||
|
final PromotionInfoListBean promotion;
|
||
|
final int couponCount;
|
||
|
|
||
|
ActivityCouponRemarks(
|
||
|
this.couponCart,
|
||
|
this.activityCart,
|
||
|
this.couponListBean,
|
||
|
this.promotion,
|
||
|
this.couponCount,
|
||
|
);
|
||
|
|
||
|
@override
|
||
|
State<StatefulWidget> createState() {
|
||
|
return _ActivityCouponRemarks();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Container(
|
||
|
decoration: BoxDecoration(
|
||
|
color: Colors.white,
|
||
|
boxShadow: [
|
||
|
BoxShadow(
|
||
|
color: Color(0x0D000000),
|
||
|
offset: Offset(0, 3),
|
||
|
blurRadius: 14,
|
||
|
spreadRadius: 0,
|
||
|
),
|
||
|
],
|
||
|
borderRadius: BorderRadius.circular(8),
|
||
|
),
|
||
|
height: 122.h,
|
||
|
margin: EdgeInsets.only(
|
||
|
left: 16,
|
||
|
right: 16,
|
||
|
top: 15,
|
||
|
),
|
||
|
padding: EdgeInsets.only(
|
||
|
left: 16,
|
||
|
right: 16,
|
||
|
top: 14,
|
||
|
bottom: 14,
|
||
|
),
|
||
|
child: Column(
|
||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||
|
children: [
|
||
|
InkWell(
|
||
|
onTap: () {
|
||
|
widget.activityCart();
|
||
|
},
|
||
|
child: Row(
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||
|
children: [
|
||
|
Expanded(
|
||
|
flex: 1,
|
||
|
child: Text(
|
||
|
S.of(context).huodong,
|
||
|
style: TextStyle(
|
||
|
fontWeight: MyFontWeight.regular,
|
||
|
fontSize: 14.sp,
|
||
|
color: Color(0xFF353535),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
Text(
|
||
|
widget.promotion == null ? "*优惠券与活动不可同时选择" : widget.promotion.name,
|
||
|
textAlign: TextAlign.end,
|
||
|
style: TextStyle(
|
||
|
fontSize: 14.sp,
|
||
|
color: Color(0xFF32A060),
|
||
|
fontWeight: MyFontWeight.semi_bold,
|
||
|
),
|
||
|
),
|
||
|
Icon(
|
||
|
Icons.keyboard_arrow_right,
|
||
|
size: 16,
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
SizedBox(
|
||
|
height: 13,
|
||
|
),
|
||
|
InkWell(
|
||
|
onTap: () {
|
||
|
widget.couponCart();
|
||
|
},
|
||
|
child: Row(
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||
|
children: [
|
||
|
Expanded(
|
||
|
flex: 1,
|
||
|
child: Text(
|
||
|
S.of(context).youhuiquan,
|
||
|
style: TextStyle(
|
||
|
fontWeight: MyFontWeight.regular,
|
||
|
fontSize: 14.sp,
|
||
|
color: Color(0xFF353535),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
Text(
|
||
|
(widget.couponListBean == null)
|
||
|
? ("未使用优惠券")
|
||
|
: widget.couponListBean.promotionName,
|
||
|
textAlign: TextAlign.end,
|
||
|
style: TextStyle(
|
||
|
fontSize: 14.sp,
|
||
|
color: Color(0xFF32A060),
|
||
|
fontWeight: MyFontWeight.semi_bold,
|
||
|
),
|
||
|
),
|
||
|
Icon(
|
||
|
Icons.keyboard_arrow_right,
|
||
|
size: 16,
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
SizedBox(
|
||
|
height: 13,
|
||
|
),
|
||
|
Row(
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||
|
children: [
|
||
|
Expanded(
|
||
|
flex: 1,
|
||
|
child: Text(
|
||
|
S.of(context).beizhu,
|
||
|
style: TextStyle(
|
||
|
fontWeight: MyFontWeight.regular,
|
||
|
fontSize: 14.sp,
|
||
|
color: Color(0xFF353535),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
Text(
|
||
|
"口味、面包硬度等",
|
||
|
textAlign: TextAlign.end,
|
||
|
style: TextStyle(
|
||
|
fontSize: 14.sp,
|
||
|
color: Color(0xFF353535),
|
||
|
fontWeight: MyFontWeight.semi_bold,
|
||
|
),
|
||
|
),
|
||
|
Icon(
|
||
|
Icons.keyboard_arrow_right,
|
||
|
size: 16,
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|