|
...
|
...
|
@@ -67,563 +67,622 @@ class _CouponItemFState extends State<CouponItemF> { |
|
|
|
}
|
|
|
|
return InkWell(
|
|
|
|
onTap: widget.onPressed,
|
|
|
|
child: Column(children: [
|
|
|
|
Stack(
|
|
|
|
alignment: widget.from == 'select'
|
|
|
|
? Alignment.centerLeft
|
|
|
|
: AlignmentDirectional.topStart,
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
child: Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: Column(children: [
|
|
|
|
Stack(
|
|
|
|
alignment: widget.from == 'select'
|
|
|
|
? Alignment.centerLeft
|
|
|
|
: AlignmentDirectional.topStart,
|
|
|
|
children: [
|
|
|
|
HEmptyView(20),
|
|
|
|
widget.from == 'select'
|
|
|
|
? InkWell(
|
|
|
|
onTap: widget.onPressedSelect,
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
HEmptyView(20),
|
|
|
|
widget.from == 'select'
|
|
|
|
? InkWell(
|
|
|
|
onTap: widget.onPressedSelect,
|
|
|
|
child: Container(
|
|
|
|
// color: Colors.red,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: w(50), horizontal: w(5)),
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath(sunModel.isCheck
|
|
|
|
? widget.radio
|
|
|
|
? 'c_mul_select'
|
|
|
|
: 'select_f'
|
|
|
|
: widget.radio
|
|
|
|
? 'c_not_edit'
|
|
|
|
: 'show_select_f'),
|
|
|
|
width: w(20),
|
|
|
|
),
|
|
|
|
))
|
|
|
|
: Container(),
|
|
|
|
Expanded(
|
|
|
|
child: Container(
|
|
|
|
// color: Colors.red,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: w(50), horizontal: w(5)),
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath(sunModel.isCheck
|
|
|
|
? widget.radio
|
|
|
|
? 'c_mul_select'
|
|
|
|
: 'select_f'
|
|
|
|
: widget.radio
|
|
|
|
? 'c_not_edit'
|
|
|
|
: 'show_select_f'),
|
|
|
|
width: w(20),
|
|
|
|
),
|
|
|
|
))
|
|
|
|
: Container(),
|
|
|
|
Expanded(
|
|
|
|
child: Container(
|
|
|
|
// width: ScreenUtil().setWidth(610),
|
|
|
|
margin: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(20),
|
|
|
|
ScreenUtil().setWidth(0),
|
|
|
|
ScreenUtil().setWidth(40),
|
|
|
|
ScreenUtil().setWidth(0)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
boxShadow: [
|
|
|
|
BoxShadow(
|
|
|
|
spreadRadius: ScreenUtil().setWidth(2),
|
|
|
|
color: Color.fromRGBO(0, 0, 0, 0.25),
|
|
|
|
offset: Offset(0, ScreenUtil().setWidth(8)),
|
|
|
|
blurRadius: ScreenUtil().setWidth(8))
|
|
|
|
],
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(ScreenUtil().setWidth(16)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(40),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(24)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: widget.from == 'history'
|
|
|
|
? MyColours.color_BFC4D4
|
|
|
|
: widget.from == 'setting'
|
|
|
|
? MyColours.color_00A870
|
|
|
|
: notSelect
|
|
|
|
? sunModel.isType == '1' ||
|
|
|
|
sunModel.isType == '3' ||
|
|
|
|
sunModel.isType == '4'
|
|
|
|
? sunModel.isMarking
|
|
|
|
? MyColours.color_00A870
|
|
|
|
: MyColours.color_438E93
|
|
|
|
: MyColours.color_ED7B2F
|
|
|
|
: MyColours.color_999999,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topLeft: Radius.circular(
|
|
|
|
ScreenUtil().setWidth(16)),
|
|
|
|
topRight: Radius.circular(
|
|
|
|
ScreenUtil().setWidth(16)))),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
sunModel.isType == '1'
|
|
|
|
? '付费优惠券'
|
|
|
|
: sunModel.isType == '2'
|
|
|
|
? '我的优惠券'
|
|
|
|
: sunModel.isType == '3'
|
|
|
|
? '免费代金券'
|
|
|
|
: '付费优惠券',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(24)),
|
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
onTap: widget.onPressedSwich,
|
|
|
|
child: Text(
|
|
|
|
// width: ScreenUtil().setWidth(610),
|
|
|
|
margin: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(20),
|
|
|
|
ScreenUtil().setWidth(0),
|
|
|
|
ScreenUtil().setWidth(40),
|
|
|
|
ScreenUtil().setWidth(0)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
boxShadow: [
|
|
|
|
BoxShadow(
|
|
|
|
spreadRadius: ScreenUtil().setWidth(2),
|
|
|
|
color: Color.fromRGBO(0, 0, 0, 0.25),
|
|
|
|
offset: Offset(0, ScreenUtil().setWidth(8)),
|
|
|
|
blurRadius: ScreenUtil().setWidth(8))
|
|
|
|
],
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(ScreenUtil().setWidth(16)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(40),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(24)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: widget.from == 'history'
|
|
|
|
? MyColours.color_BFC4D4
|
|
|
|
: widget.from == 'setting'
|
|
|
|
? MyColours.color_00A870
|
|
|
|
: notSelect
|
|
|
|
? sunModel.isType == '1' ||
|
|
|
|
sunModel.isType ==
|
|
|
|
'3' ||
|
|
|
|
sunModel.isType == '4'
|
|
|
|
? sunModel.isMarking
|
|
|
|
? MyColours.color_00A870
|
|
|
|
: MyColours.color_438E93
|
|
|
|
: MyColours.color_ED7B2F
|
|
|
|
: MyColours.color_999999,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topLeft: Radius.circular(
|
|
|
|
ScreenUtil().setWidth(16)),
|
|
|
|
topRight: Radius.circular(
|
|
|
|
ScreenUtil().setWidth(16)))),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
sunModel.isType == '1'
|
|
|
|
? sunModel.isExamine == '1'
|
|
|
|
? sunModel.receiveNum == null
|
|
|
|
? ''
|
|
|
|
: '被领取:${sunModel.receiveNum}张 已核销:${sunModel.useNum}张'
|
|
|
|
: '创建人:${sunModel.nickname ?? sunModel.uid} 被领取:${sunModel.receiveNum}张'
|
|
|
|
? '付费优惠券'
|
|
|
|
: sunModel.isType == '2'
|
|
|
|
? '被领取:${sunModel.receiveNum}张'
|
|
|
|
: sunModel.receiveNum == null
|
|
|
|
? ''
|
|
|
|
: '被领取:${sunModel.receiveNum}张 已使用:${sunModel.useNum}张',
|
|
|
|
maxLines: 1,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
? '我的优惠券'
|
|
|
|
: sunModel.isType == '3'
|
|
|
|
? '免费代金券'
|
|
|
|
: '付费优惠券',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(20))),
|
|
|
|
fontSize: ScreenUtil().setSp(24)),
|
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
onTap: widget.onPressedSwich,
|
|
|
|
child: Text(
|
|
|
|
sunModel.isType == '1'
|
|
|
|
? sunModel.isExamine == '1'
|
|
|
|
? sunModel.receiveNum == null
|
|
|
|
? ''
|
|
|
|
: '被领取:${sunModel.receiveNum}张 已核销:${sunModel.useNum}张'
|
|
|
|
: '创建人:${sunModel.nickname ?? sunModel.uid} 被领取:${sunModel.receiveNum}张'
|
|
|
|
: sunModel.isType == '2'
|
|
|
|
? '被领取:${sunModel.receiveNum}张'
|
|
|
|
: sunModel.receiveNum == null
|
|
|
|
? ''
|
|
|
|
: '被领取:${sunModel.receiveNum}张 已使用:${sunModel.useNum}张',
|
|
|
|
maxLines: 1,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(20))),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(24 * 2),
|
|
|
|
ScreenUtil().setWidth(9 * 2),
|
|
|
|
ScreenUtil().setWidth(10),
|
|
|
|
ScreenUtil().setWidth(20)),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(24 * 2),
|
|
|
|
ScreenUtil().setWidth(9 * 2),
|
|
|
|
ScreenUtil().setWidth(10),
|
|
|
|
ScreenUtil().setWidth(20)),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
// width: ScreenUtil()
|
|
|
|
// .setWidth(232 * 2),
|
|
|
|
child: Container(
|
|
|
|
// height: ScreenUtil().setWidth(25 * 2),
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
maxWidth: ((widget.from ==
|
|
|
|
'select' &&
|
|
|
|
sunModel.isType ==
|
|
|
|
'3' &&
|
|
|
|
widget.radio) ||
|
|
|
|
(widget.from ==
|
|
|
|
'setting' &&
|
|
|
|
sunModel.isType ==
|
|
|
|
'3') ||
|
|
|
|
widget.showBtn)
|
|
|
|
? ScreenUtil().screenWidth -
|
|
|
|
w(160)
|
|
|
|
: double.infinity),
|
|
|
|
child: Text(
|
|
|
|
sunModel.aname ?? '', //
|
|
|
|
maxLines: 10,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: widget.from == 'history'
|
|
|
|
? MyColours.color_BFC4D4
|
|
|
|
: notSelect
|
|
|
|
? MyColours.color_515151
|
|
|
|
: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(36),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(14 * 2),
|
|
|
|
width: ScreenUtil().setWidth(232 * 2),
|
|
|
|
child: Text(
|
|
|
|
sunModel.isType == '1' ||
|
|
|
|
sunModel.isType == '2'
|
|
|
|
? '${sunModel.desc}'
|
|
|
|
: sunModel.desc == '0'
|
|
|
|
? ''
|
|
|
|
: '消费满${sunModel.desc}元可用',
|
|
|
|
maxLines: 1,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: widget.from == 'history'
|
|
|
|
? MyColours.color_BFC4D4
|
|
|
|
: notSelect
|
|
|
|
? MyColours.color_515151
|
|
|
|
: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(20),
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
if (widget.from == 'select' &&
|
|
|
|
sunModel.isType == '3' &&
|
|
|
|
widget.radio &&
|
|
|
|
widget.needNum)
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (sunModel.number == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
sunModel.number--;
|
|
|
|
sunModel.numberC.text =
|
|
|
|
'${sunModel.number}';
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
height: w(40),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(10)),
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath(
|
|
|
|
'plan_dish_minus'),
|
|
|
|
width: w(8),
|
|
|
|
Expanded(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
// width: ScreenUtil()
|
|
|
|
// .setWidth(232 * 2),
|
|
|
|
child: Container(
|
|
|
|
// height: ScreenUtil().setWidth(25 * 2),
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
maxWidth: ((widget.from ==
|
|
|
|
'select' &&
|
|
|
|
sunModel.isType ==
|
|
|
|
'3' &&
|
|
|
|
widget.radio) ||
|
|
|
|
(widget.from ==
|
|
|
|
'setting' &&
|
|
|
|
sunModel.isType ==
|
|
|
|
'3') ||
|
|
|
|
widget.showBtn)
|
|
|
|
? ScreenUtil()
|
|
|
|
.screenWidth -
|
|
|
|
w(160)
|
|
|
|
: double.infinity),
|
|
|
|
child: Text(
|
|
|
|
sunModel.aname ?? '', //
|
|
|
|
maxLines: 10,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: widget.from ==
|
|
|
|
'history'
|
|
|
|
? MyColours.color_BFC4D4
|
|
|
|
: notSelect
|
|
|
|
? MyColours
|
|
|
|
.color_515151
|
|
|
|
: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(36),
|
|
|
|
fontWeight:
|
|
|
|
FontWeight.bold),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
Container(
|
|
|
|
height:
|
|
|
|
ScreenUtil().setWidth(14 * 2),
|
|
|
|
width: ScreenUtil()
|
|
|
|
.setWidth(232 * 2),
|
|
|
|
child: Text(
|
|
|
|
sunModel.isType == '1' ||
|
|
|
|
sunModel.isType == '2'
|
|
|
|
? '${sunModel.desc}'
|
|
|
|
: sunModel.desc == '0'
|
|
|
|
? ''
|
|
|
|
: '消费满${sunModel.desc}元可用',
|
|
|
|
maxLines: 1,
|
|
|
|
overflow:
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: widget.from ==
|
|
|
|
'history'
|
|
|
|
? MyColours.color_BFC4D4
|
|
|
|
: notSelect
|
|
|
|
? MyColours
|
|
|
|
.color_515151
|
|
|
|
: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(20),
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
// constraints: BoxConstraints(
|
|
|
|
// minWidth: w(34),
|
|
|
|
// ),
|
|
|
|
width: w(30),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(
|
|
|
|
r(5)),
|
|
|
|
border: Border.all(
|
|
|
|
width: w(1),
|
|
|
|
color: MyColours
|
|
|
|
.color_438E93)),
|
|
|
|
// constraints: BoxConstraints(minWidth: w(20)),
|
|
|
|
child: TextField(
|
|
|
|
maxLines: 1,
|
|
|
|
controller: sunModel.numberC,
|
|
|
|
// focusNode: _focusNode,
|
|
|
|
// autofocus: true,
|
|
|
|
|
|
|
|
inputFormatters: [
|
|
|
|
FilteringTextInputFormatter
|
|
|
|
.allow(RegExp(r'[0-9]')),
|
|
|
|
],
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
color:
|
|
|
|
MyColours.color_438E93,
|
|
|
|
fontSize: font(11)),
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
// textAlignVertical: TextAlignVertical.center,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: "数量",
|
|
|
|
isCollapsed: true,
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color:
|
|
|
|
MyColours.color_999999,
|
|
|
|
fontSize: font(11),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
if (widget.from == 'select' &&
|
|
|
|
sunModel.isType == '3' &&
|
|
|
|
widget.radio &&
|
|
|
|
widget.needNum)
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (sunModel.number == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
sunModel.number--;
|
|
|
|
sunModel.numberC.text =
|
|
|
|
'${sunModel.number}';
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
height: w(40),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(10)),
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath(
|
|
|
|
'plan_dish_minus'),
|
|
|
|
width: w(8),
|
|
|
|
),
|
|
|
|
// isCollapsed:
|
|
|
|
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderSide:
|
|
|
|
BorderSide.none),
|
|
|
|
contentPadding:
|
|
|
|
EdgeInsets.only(
|
|
|
|
top: w(2),
|
|
|
|
bottom: w(2)),
|
|
|
|
),
|
|
|
|
keyboardType: TextInputType
|
|
|
|
.numberWithOptions(
|
|
|
|
decimal: true),
|
|
|
|
textInputAction:
|
|
|
|
TextInputAction.done,
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
// constraints: BoxConstraints(
|
|
|
|
// minWidth: w(34),
|
|
|
|
// ),
|
|
|
|
width: w(30),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(
|
|
|
|
r(5)),
|
|
|
|
border: Border.all(
|
|
|
|
width: w(1),
|
|
|
|
color: MyColours
|
|
|
|
.color_438E93)),
|
|
|
|
// constraints: BoxConstraints(minWidth: w(20)),
|
|
|
|
child: TextField(
|
|
|
|
maxLines: 1,
|
|
|
|
controller:
|
|
|
|
sunModel.numberC,
|
|
|
|
// focusNode: _focusNode,
|
|
|
|
// autofocus: true,
|
|
|
|
|
|
|
|
inputFormatters: [
|
|
|
|
FilteringTextInputFormatter
|
|
|
|
.allow(
|
|
|
|
RegExp(r'[0-9]')),
|
|
|
|
],
|
|
|
|
|
|
|
|
onChanged: (value) {
|
|
|
|
// bool isNumber = Utils.isNumeric(
|
|
|
|
// value); //判断输入的内容是否是数字
|
|
|
|
// if (!isNumber) {
|
|
|
|
// Utils.showToast('请输入数字');
|
|
|
|
// pNumC.text = '';
|
|
|
|
// return;
|
|
|
|
// } else {
|
|
|
|
if (value != null &&
|
|
|
|
value != '') {
|
|
|
|
if (int.parse(value) >
|
|
|
|
int.parse(
|
|
|
|
sunModel.grantNum ??
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_438E93,
|
|
|
|
fontSize: font(11)),
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
// textAlignVertical: TextAlignVertical.center,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: "数量",
|
|
|
|
isCollapsed: true,
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize: font(11),
|
|
|
|
),
|
|
|
|
// isCollapsed:
|
|
|
|
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
|
|
|
|
border:
|
|
|
|
OutlineInputBorder(
|
|
|
|
borderSide:
|
|
|
|
BorderSide
|
|
|
|
.none),
|
|
|
|
contentPadding:
|
|
|
|
EdgeInsets.only(
|
|
|
|
top: w(2),
|
|
|
|
bottom: w(2)),
|
|
|
|
),
|
|
|
|
keyboardType: TextInputType
|
|
|
|
.numberWithOptions(
|
|
|
|
decimal: true),
|
|
|
|
textInputAction:
|
|
|
|
TextInputAction.done,
|
|
|
|
|
|
|
|
onChanged: (value) {
|
|
|
|
// bool isNumber = Utils.isNumeric(
|
|
|
|
// value); //判断输入的内容是否是数字
|
|
|
|
// if (!isNumber) {
|
|
|
|
// Utils.showToast('请输入数字');
|
|
|
|
// pNumC.text = '';
|
|
|
|
// return;
|
|
|
|
// } else {
|
|
|
|
if (value != null &&
|
|
|
|
value != '') {
|
|
|
|
if (int.parse(value) >
|
|
|
|
int.parse(sunModel
|
|
|
|
.grantNum ??
|
|
|
|
'0')) {
|
|
|
|
Utils.showToast(
|
|
|
|
'最大数量限制为${sunModel.grantNum}');
|
|
|
|
sunModel.numberC.text =
|
|
|
|
sunModel.grantNum ??
|
|
|
|
'';
|
|
|
|
sunModel.number =
|
|
|
|
int.parse(sunModel
|
|
|
|
Utils.showToast(
|
|
|
|
'最大数量限制为${sunModel.grantNum}');
|
|
|
|
sunModel.numberC
|
|
|
|
.text = sunModel
|
|
|
|
.grantNum ??
|
|
|
|
'0');
|
|
|
|
'';
|
|
|
|
sunModel.number =
|
|
|
|
int.parse(sunModel
|
|
|
|
.grantNum ??
|
|
|
|
'0');
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
sunModel.number =
|
|
|
|
int.parse(value);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (int.parse(value) >
|
|
|
|
5) {
|
|
|
|
Utils.showToast(
|
|
|
|
'最多可设置5张');
|
|
|
|
sunModel.numberC
|
|
|
|
.text = '5';
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
sunModel.number =
|
|
|
|
int.parse(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
// }
|
|
|
|
// setState(() {});
|
|
|
|
// _searchSellerLocation();
|
|
|
|
// customerProvider.searchData(value);
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(
|
|
|
|
FocusNode()); //点击空白处隐藏键盘
|
|
|
|
// contantShowModel.searchData(
|
|
|
|
// contantShowModel.controller.text);
|
|
|
|
// _searchSellerLocation();
|
|
|
|
// _focusNode.unfocus();
|
|
|
|
// }
|
|
|
|
// setState(() {});
|
|
|
|
// _searchSellerLocation();
|
|
|
|
// customerProvider.searchData(value);
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(
|
|
|
|
FocusNode()); //点击空白处隐藏键盘
|
|
|
|
// contantShowModel.searchData(
|
|
|
|
// contantShowModel.controller.text);
|
|
|
|
// _searchSellerLocation();
|
|
|
|
// _focusNode.unfocus();
|
|
|
|
},
|
|
|
|
)),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (sunModel.number ==
|
|
|
|
int.parse(
|
|
|
|
sunModel.grantNum ??
|
|
|
|
'0')) {
|
|
|
|
Utils.showToast(
|
|
|
|
'已达到最大数量限制');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (sunModel.number >= 5) {
|
|
|
|
Utils.showToast('最多可设置5张');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
sunModel.number++;
|
|
|
|
sunModel.numberC.text =
|
|
|
|
'${sunModel.number}';
|
|
|
|
},
|
|
|
|
)),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (sunModel.number ==
|
|
|
|
int.parse(sunModel.grantNum ??
|
|
|
|
'0')) {
|
|
|
|
Utils.showToast('已达到最大数量限制');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
sunModel.number++;
|
|
|
|
sunModel.numberC.text =
|
|
|
|
'${sunModel.number}';
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
height: w(40),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: w(10), right: w(10)),
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath(
|
|
|
|
'plan_dish_add'),
|
|
|
|
width: w(8),
|
|
|
|
child: Container(
|
|
|
|
height: w(40),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: w(10),
|
|
|
|
right: w(10)),
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath(
|
|
|
|
'plan_dish_add'),
|
|
|
|
width: w(8),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
if (widget.from == 'setting' &&
|
|
|
|
sunModel.isType == '3')
|
|
|
|
Padding(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(right: w(20)),
|
|
|
|
child: Text(
|
|
|
|
'${sunModel.number}张',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(12),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_438E93),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(16),
|
|
|
|
if (sunModel.isType == '3' &&
|
|
|
|
sunModel.expirationDate != null)
|
|
|
|
Container(
|
|
|
|
child: Text(
|
|
|
|
sunModel.expirationDate!.validForever ==
|
|
|
|
'1'
|
|
|
|
? '使用时间:永久有效'
|
|
|
|
: '使用时间:${ObjectUtil.isNotEmpty(sunModel.expirationDate!.stime) ? Utils.getDateStrFromJiekou(sunModel.expirationDate!.stime) : '--'} 至 ${ObjectUtil.isNotEmpty(sunModel.expirationDate!.etime) ? Utils.getDateStrFromJiekou(sunModel.expirationDate!.etime) : '--'}',
|
|
|
|
style: TextStyle(
|
|
|
|
color: widget.from == 'history'
|
|
|
|
? MyColours.color_BFC4D4
|
|
|
|
: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(20))),
|
|
|
|
),
|
|
|
|
(sunModel.isType == '1' &&
|
|
|
|
ObjectUtil.isNotEmpty(
|
|
|
|
sunModel.stime) &&
|
|
|
|
sunModel.stime != '0') ||
|
|
|
|
(sunModel.isType == '1' &&
|
|
|
|
ObjectUtil.isNotEmpty(
|
|
|
|
sunModel.etime) &&
|
|
|
|
sunModel.etime != '0')
|
|
|
|
? Container(
|
|
|
|
if (widget.from == 'setting' &&
|
|
|
|
sunModel.isType == '3')
|
|
|
|
Padding(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(right: w(20)),
|
|
|
|
child: Text(
|
|
|
|
'${sunModel.number}张',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(12),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color:
|
|
|
|
MyColours.color_438E93),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(16),
|
|
|
|
if (sunModel.isType == '3' &&
|
|
|
|
sunModel.expirationDate != null)
|
|
|
|
Container(
|
|
|
|
child: Text(
|
|
|
|
'使用时间:${ObjectUtil.isNotEmpty(sunModel.stime) ? Utils.getDateStrFromJiekou(sunModel.stime) : '--'} 至 ${ObjectUtil.isNotEmpty(sunModel.etime) ? Utils.getDateStrFromJiekou(sunModel.etime) : '--'}',
|
|
|
|
sunModel.expirationDate!
|
|
|
|
.validForever ==
|
|
|
|
'1'
|
|
|
|
? '使用时间:永久有效'
|
|
|
|
: '使用时间:${ObjectUtil.isNotEmpty(sunModel.expirationDate!.stime) ? Utils.getDateStrFromJiekou(sunModel.expirationDate!.stime) : '--'} 至 ${ObjectUtil.isNotEmpty(sunModel.expirationDate!.etime) ? Utils.getDateStrFromJiekou(sunModel.expirationDate!.etime) : '--'}',
|
|
|
|
style: TextStyle(
|
|
|
|
color: widget.from == 'history'
|
|
|
|
? MyColours.color_BFC4D4
|
|
|
|
: MyColours.color_999999,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(20))),
|
|
|
|
)
|
|
|
|
: Container(),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
// widget.from == 'select'
|
|
|
|
// ? widget.showCheck
|
|
|
|
// ? Positioned(
|
|
|
|
// right: 0,
|
|
|
|
// top: ScreenUtil().setWidth(20),
|
|
|
|
// child: Image.asset(
|
|
|
|
// Utils.getImgPath(widget.couponSonModel.isCheck
|
|
|
|
// ? 'check_r'
|
|
|
|
// : 'check_un'),
|
|
|
|
// width: ScreenUtil().setWidth(40),
|
|
|
|
// height: ScreenUtil().setWidth(40),
|
|
|
|
// ))
|
|
|
|
// : Container()
|
|
|
|
// :
|
|
|
|
),
|
|
|
|
ObjectUtil.isNotEmpty(sunModel.explain)
|
|
|
|
? const MySeparator(
|
|
|
|
width: 3, color: MyColours.color_f3f3f3)
|
|
|
|
: SizedBox(),
|
|
|
|
ObjectUtil.isNotEmpty(sunModel.explain)
|
|
|
|
? InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (explainH > 19) {
|
|
|
|
setState(() {
|
|
|
|
widget.couponSonModel!.showText =
|
|
|
|
!widget.couponSonModel!.showText;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: widget.from == 'history'
|
|
|
|
? MyColours.color_ffffff
|
|
|
|
: notSelect
|
|
|
|
),
|
|
|
|
(sunModel.isType == '1' &&
|
|
|
|
ObjectUtil.isNotEmpty(
|
|
|
|
sunModel.stime) &&
|
|
|
|
sunModel.stime != '0') ||
|
|
|
|
(sunModel.isType == '1' &&
|
|
|
|
ObjectUtil.isNotEmpty(
|
|
|
|
sunModel.etime) &&
|
|
|
|
sunModel.etime != '0')
|
|
|
|
? Container(
|
|
|
|
child: Text(
|
|
|
|
'使用时间:${ObjectUtil.isNotEmpty(sunModel.stime) ? Utils.getDateStrFromJiekou(sunModel.stime) : '--'} 至 ${ObjectUtil.isNotEmpty(sunModel.etime) ? Utils.getDateStrFromJiekou(sunModel.etime) : '--'}',
|
|
|
|
style: TextStyle(
|
|
|
|
color: widget.from ==
|
|
|
|
'history'
|
|
|
|
? MyColours.color_BFC4D4
|
|
|
|
: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize: ScreenUtil()
|
|
|
|
.setSp(20))),
|
|
|
|
)
|
|
|
|
: Container(),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
// widget.from == 'select'
|
|
|
|
// ? widget.showCheck
|
|
|
|
// ? Positioned(
|
|
|
|
// right: 0,
|
|
|
|
// top: ScreenUtil().setWidth(20),
|
|
|
|
// child: Image.asset(
|
|
|
|
// Utils.getImgPath(widget.couponSonModel.isCheck
|
|
|
|
// ? 'check_r'
|
|
|
|
// : 'check_un'),
|
|
|
|
// width: ScreenUtil().setWidth(40),
|
|
|
|
// height: ScreenUtil().setWidth(40),
|
|
|
|
// ))
|
|
|
|
// : Container()
|
|
|
|
// :
|
|
|
|
),
|
|
|
|
ObjectUtil.isNotEmpty(sunModel.explain)
|
|
|
|
? const MySeparator(
|
|
|
|
width: 3, color: MyColours.color_f3f3f3)
|
|
|
|
: SizedBox(),
|
|
|
|
ObjectUtil.isNotEmpty(sunModel.explain)
|
|
|
|
? InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (explainH > 19) {
|
|
|
|
setState(() {
|
|
|
|
widget.couponSonModel!.showText =
|
|
|
|
!widget
|
|
|
|
.couponSonModel!.showText;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: widget.from == 'history'
|
|
|
|
? MyColours.color_ffffff
|
|
|
|
: MyColours.color_FAFAFA,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
bottomLeft: Radius.circular(
|
|
|
|
ScreenUtil().setWidth(20)),
|
|
|
|
bottomRight: Radius.circular(
|
|
|
|
ScreenUtil().setWidth(20)))),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
widget.couponSonModel!.showText
|
|
|
|
? Container(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
: notSelect
|
|
|
|
? MyColours.color_ffffff
|
|
|
|
: MyColours.color_FAFAFA,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
bottomLeft: Radius.circular(
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(24 * 2),
|
|
|
|
ScreenUtil().setWidth(14),
|
|
|
|
ScreenUtil().setWidth(0),
|
|
|
|
.setWidth(20)),
|
|
|
|
bottomRight: Radius.circular(
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(14)),
|
|
|
|
width:
|
|
|
|
ScreenUtil().screenWidth -
|
|
|
|
.setWidth(20)))),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
widget.couponSonModel!.showText
|
|
|
|
? Container(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(
|
|
|
|
24 * 2),
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(14),
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(0),
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(
|
|
|
|
14)),
|
|
|
|
width: ScreenUtil()
|
|
|
|
.screenWidth -
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(92 * 2),
|
|
|
|
child: Text(
|
|
|
|
'说明:${sunModel.explain}',
|
|
|
|
maxLines: 5,
|
|
|
|
style: TextStyle(
|
|
|
|
color: widget.from ==
|
|
|
|
'history'
|
|
|
|
? MyColours
|
|
|
|
.color_BFC4D4
|
|
|
|
: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize: ScreenUtil()
|
|
|
|
.setSp(20))),
|
|
|
|
)
|
|
|
|
: Container(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(24 * 2),
|
|
|
|
ScreenUtil().setWidth(14),
|
|
|
|
ScreenUtil().setWidth(0),
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(14)),
|
|
|
|
width: ScreenUtil()
|
|
|
|
.screenWidth -
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(92 * 2) +
|
|
|
|
ScreenUtil().setWidth(20),
|
|
|
|
child: Text(
|
|
|
|
'说明:${sunModel.explain}',
|
|
|
|
maxLines: 1,
|
|
|
|
overflow:
|
|
|
|
TextOverflow.fade,
|
|
|
|
softWrap: false,
|
|
|
|
style: TextStyle(
|
|
|
|
color: widget.from ==
|
|
|
|
'history'
|
|
|
|
? MyColours
|
|
|
|
.color_BFC4D4
|
|
|
|
: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize: ScreenUtil()
|
|
|
|
.setSp(20))),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
explainH > 19
|
|
|
|
? Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
top: ScreenUtil()
|
|
|
|
.setWidth(10),
|
|
|
|
right: ScreenUtil()
|
|
|
|
.setWidth(16)),
|
|
|
|
child: Image.asset(
|
|
|
|
!widget.couponSonModel!
|
|
|
|
.showText
|
|
|
|
? Utils.getImgPath(
|
|
|
|
'quan_down_f')
|
|
|
|
: Utils.getImgPath(
|
|
|
|
'quan_up_f'),
|
|
|
|
child: Text(
|
|
|
|
'说明:${sunModel.explain}',
|
|
|
|
maxLines: 5,
|
|
|
|
style: TextStyle(
|
|
|
|
color: widget
|
|
|
|
.from ==
|
|
|
|
'history'
|
|
|
|
? MyColours
|
|
|
|
.color_BFC4D4
|
|
|
|
: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil()
|
|
|
|
.setSp(
|
|
|
|
20))),
|
|
|
|
)
|
|
|
|
: Container(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(
|
|
|
|
24 * 2),
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(14),
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(0),
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(
|
|
|
|
14)),
|
|
|
|
width: ScreenUtil()
|
|
|
|
.setWidth(28),
|
|
|
|
height: ScreenUtil()
|
|
|
|
.setWidth(28)),
|
|
|
|
)
|
|
|
|
: Container(),
|
|
|
|
HEmptyView(14)
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
)
|
|
|
|
: Container(),
|
|
|
|
VEmptyView(32),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
right: ScreenUtil().setWidth(100),
|
|
|
|
top: ScreenUtil().setWidth(37 * 2),
|
|
|
|
child: widget.showBtn
|
|
|
|
? RoundButton(
|
|
|
|
width: widget.from == 'history'
|
|
|
|
? ScreenUtil().setWidth(44 * 2)
|
|
|
|
: ScreenUtil().setWidth(32 * 2),
|
|
|
|
height: ScreenUtil().setWidth(21 * 2),
|
|
|
|
radius: ScreenUtil().setWidth(10),
|
|
|
|
text: widget.from == 'history'
|
|
|
|
? '已过期'
|
|
|
|
: notSelect
|
|
|
|
? '停用'
|
|
|
|
: '启用',
|
|
|
|
fontSize: 24,
|
|
|
|
textColor: widget.from == 'history'
|
|
|
|
? MyColours.color_BFC4D4
|
|
|
|
: widget.canOperate && notSelect
|
|
|
|
? MyColours.color_438E93
|
|
|
|
: MyColours.color_999999,
|
|
|
|
gradientStart: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
borderColor: widget.from == 'history'
|
|
|
|
? MyColours.color_BFC4D4
|
|
|
|
: widget.canOperate && notSelect
|
|
|
|
? MyColours.color_438E93
|
|
|
|
: MyColours.color_999999,
|
|
|
|
onPressed: widget.onPressedSwich,
|
|
|
|
)
|
|
|
|
: Container())
|
|
|
|
]),
|
|
|
|
VEmptyView(32)
|
|
|
|
]));
|
|
|
|
.screenWidth -
|
|
|
|
ScreenUtil().setWidth(
|
|
|
|
92 * 2) +
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(20),
|
|
|
|
child: Text(
|
|
|
|
'说明:${sunModel.explain}',
|
|
|
|
maxLines: 1,
|
|
|
|
overflow:
|
|
|
|
TextOverflow.fade,
|
|
|
|
softWrap: false,
|
|
|
|
style: TextStyle(
|
|
|
|
color: widget
|
|
|
|
.from ==
|
|
|
|
'history'
|
|
|
|
? MyColours
|
|
|
|
.color_BFC4D4
|
|
|
|
: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil()
|
|
|
|
.setSp(
|
|
|
|
20))),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
explainH > 19
|
|
|
|
? Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
top: ScreenUtil()
|
|
|
|
.setWidth(10),
|
|
|
|
right: ScreenUtil()
|
|
|
|
.setWidth(16)),
|
|
|
|
child: Image.asset(
|
|
|
|
!widget.couponSonModel!
|
|
|
|
.showText
|
|
|
|
? Utils.getImgPath(
|
|
|
|
'quan_down_f')
|
|
|
|
: Utils.getImgPath(
|
|
|
|
'quan_up_f'),
|
|
|
|
width: ScreenUtil()
|
|
|
|
.setWidth(28),
|
|
|
|
height: ScreenUtil()
|
|
|
|
.setWidth(28)),
|
|
|
|
)
|
|
|
|
: Container(),
|
|
|
|
HEmptyView(14)
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
)
|
|
|
|
: Container(),
|
|
|
|
VEmptyView(32),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
right: ScreenUtil().setWidth(100),
|
|
|
|
top: ScreenUtil().setWidth(37 * 2),
|
|
|
|
child: widget.showBtn
|
|
|
|
? RoundButton(
|
|
|
|
width: widget.from == 'history'
|
|
|
|
? ScreenUtil().setWidth(44 * 2)
|
|
|
|
: ScreenUtil().setWidth(32 * 2),
|
|
|
|
height: ScreenUtil().setWidth(21 * 2),
|
|
|
|
radius: ScreenUtil().setWidth(10),
|
|
|
|
text: widget.from == 'history'
|
|
|
|
? '已过期'
|
|
|
|
: notSelect
|
|
|
|
? '停用'
|
|
|
|
: '启用',
|
|
|
|
fontSize: 24,
|
|
|
|
textColor: widget.from == 'history'
|
|
|
|
? MyColours.color_BFC4D4
|
|
|
|
: widget.canOperate && notSelect
|
|
|
|
? MyColours.color_438E93
|
|
|
|
: MyColours.color_999999,
|
|
|
|
gradientStart: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
borderColor: widget.from == 'history'
|
|
|
|
? MyColours.color_BFC4D4
|
|
|
|
: widget.canOperate && notSelect
|
|
|
|
? MyColours.color_438E93
|
|
|
|
: MyColours.color_999999,
|
|
|
|
onPressed: widget.onPressedSwich,
|
|
|
|
)
|
|
|
|
: Container())
|
|
|
|
]),
|
|
|
|
VEmptyView(32)
|
|
|
|
])));
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|