|
...
|
...
|
@@ -44,13 +44,16 @@ class _CouponItemState extends State<CouponItem> { |
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
// width: ScreenUtil().setWidth(610),
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(30),
|
|
|
|
vertical: ScreenUtil().setWidth(12)),
|
|
|
|
margin: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(40),
|
|
|
|
ScreenUtil().setWidth(0),
|
|
|
|
ScreenUtil().setWidth(40),
|
|
|
|
ScreenUtil().setWidth(30)),
|
|
|
|
padding: EdgeInsets.all(ScreenUtil().setWidth(30)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: notSelect ? MyColours.app_main : MyColours.color_E0E0E0,
|
|
|
|
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
|
|
color:
|
|
|
|
notSelect ? MyColours.color_FFF0E5 : MyColours.color_EEF0F2,
|
|
|
|
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20))),
|
|
|
|
child: Column(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
...
|
...
|
@@ -68,8 +71,10 @@ class _CouponItemState extends State<CouponItem> { |
|
|
|
maxLines: 2,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(34),
|
|
|
|
color: notSelect
|
|
|
|
? MyColours.color_F05522
|
|
|
|
: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(44),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
),
|
|
...
|
...
|
@@ -82,13 +87,31 @@ class _CouponItemState extends State<CouponItem> { |
|
|
|
maxLines: 1,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(22),
|
|
|
|
fontWeight: FontWeight.bold)),
|
|
|
|
color: notSelect
|
|
|
|
? MyColours.color_F05522
|
|
|
|
: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(30),
|
|
|
|
fontWeight: FontWeight.normal)),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(ObjectUtil.isNotEmpty(sunModel.stime) &&
|
|
|
|
sunModel.stime != '0') ||
|
|
|
|
(ObjectUtil.isNotEmpty(sunModel.etime) &&
|
|
|
|
sunModel.etime != '0')
|
|
|
|
? Container(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(top: ScreenUtil().setWidth(20)),
|
|
|
|
child: Text(
|
|
|
|
'有效期:${ObjectUtil.isNotEmpty(sunModel.stime) ? Utils.getDateStrFromJiekou(sunModel.stime) : '--'} 至 ${ObjectUtil.isNotEmpty(sunModel.etime) ? Utils.getDateStrFromJiekou(sunModel.etime) : '--'}',
|
|
|
|
style: TextStyle(
|
|
|
|
color: notSelect
|
|
|
|
? MyColours.color_EF7249
|
|
|
|
: MyColours.color_B7B7B7,
|
|
|
|
fontSize: ScreenUtil().setSp(22))),
|
|
|
|
)
|
|
|
|
: Container(),
|
|
|
|
ObjectUtil.isNotEmpty(sunModel.explain)
|
|
|
|
? Container(
|
|
|
|
margin: EdgeInsets.only(top: ScreenUtil().setWidth(30)),
|
|
...
|
...
|
@@ -100,27 +123,13 @@ class _CouponItemState extends State<CouponItem> { |
|
|
|
softWrap: false,
|
|
|
|
style: TextStyle(
|
|
|
|
color: notSelect
|
|
|
|
? MyColours.app_main
|
|
|
|
: MyColours.color_e5e5e5,
|
|
|
|
fontSize: ScreenUtil().setSp(22))),
|
|
|
|
? MyColours.color_EF7249
|
|
|
|
: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(24))),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil().setWidth(10))),
|
|
|
|
)
|
|
|
|
: Container(),
|
|
|
|
(ObjectUtil.isNotEmpty(sunModel.stime) &&
|
|
|
|
sunModel.stime != '0') ||
|
|
|
|
(ObjectUtil.isNotEmpty(sunModel.etime) &&
|
|
|
|
sunModel.etime != '0')
|
|
|
|
? Container(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(top: ScreenUtil().setWidth(20)),
|
|
|
|
child: Text(
|
|
|
|
'有效期:${ObjectUtil.isNotEmpty(sunModel.stime) ? Utils.getDateStrFromJiekou(sunModel.stime) : '--'} 至 ${ObjectUtil.isNotEmpty(sunModel.etime) ? Utils.getDateStrFromJiekou(sunModel.etime) : '--'}',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(22))),
|
|
|
|
ScreenUtil().setWidth(30))),
|
|
|
|
)
|
|
|
|
: Container(),
|
|
|
|
],
|
|
...
|
...
|
@@ -138,12 +147,16 @@ class _CouponItemState extends State<CouponItem> { |
|
|
|
children: [
|
|
|
|
Text('被领取:${sunModel.receiveNum}张',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
color: notSelect
|
|
|
|
? MyColours.color_EF7249
|
|
|
|
: MyColours.color_B7B7B7,
|
|
|
|
fontSize: ScreenUtil().setSp(22))),
|
|
|
|
VEmptyView(5),
|
|
|
|
Text('已使用:${sunModel.useNum}张',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
color: notSelect
|
|
|
|
? MyColours.color_EF7249
|
|
|
|
: MyColours.color_B7B7B7,
|
|
|
|
fontSize: ScreenUtil().setSp(22))),
|
|
|
|
],
|
|
|
|
),
|
|
...
|
...
|
@@ -152,11 +165,17 @@ class _CouponItemState extends State<CouponItem> { |
|
|
|
? RoundButton(
|
|
|
|
width: ScreenUtil().setWidth(100),
|
|
|
|
height: ScreenUtil().setWidth(50),
|
|
|
|
radius: ScreenUtil().setWidth(10),
|
|
|
|
radius: ScreenUtil().setWidth(40),
|
|
|
|
text: notSelect ? '停用' : '启用',
|
|
|
|
textColor: MyColours.color_666666,
|
|
|
|
gradientStart: Colors.white,
|
|
|
|
gradientEnd: Colors.white,
|
|
|
|
textColor: notSelect
|
|
|
|
? MyColours.color_F05522
|
|
|
|
: MyColours.color_999999,
|
|
|
|
gradientStart: notSelect
|
|
|
|
? MyColours.color_FFE2D3
|
|
|
|
: MyColours.color_E9E9E9,
|
|
|
|
gradientEnd: notSelect
|
|
|
|
? MyColours.color_FFE2D3
|
|
|
|
: MyColours.color_E9E9E9,
|
|
|
|
onPressed: widget.onPressedSwich,
|
|
|
|
)
|
|
|
|
: Container()
|
...
|
...
|
|