Commit e2320b5f983cdba70a6eab23187f1a6ac876202d

Authored by wdn127929
1 parent 37804ddc

小程序封面字体大小&&支付返券开关可全部关闭

... ... @@ -5,7 +5,6 @@ import 'package:json_annotation/json_annotation.dart';
import 'package:one_key/models/CouponDataExpirationDate.dart';
import 'package:one_key/models/filter_btn_model.dart';
import 'dart:convert' as convert;
part 'coupon_model.g.dart';
... ... @@ -126,36 +125,36 @@ class CouponSunModel extends Object {
TextEditingController numberC = TextEditingController(text: '1');
CouponSunModel(
this.id,
this.uid,
this.aname,
this.desc,
this.stime,
this.etime,
this.explain,
this.status,
this.cdate,
this.receiveNum,
this.useNum,
this.nickname,
this.uidList,
this.isExamine,
this.isType,
this.isOpen,
this.isOpenBool,
this.price,
this.use,
this.arule,
this.expDate,
this.nickNameShow,
this.grantNum,
this.urllink,
this.liteQrcode,
// this.aexpiration,
this.number,
this.aexpiration,
this.expirationDate,
);
this.id,
this.uid,
this.aname,
this.desc,
this.stime,
this.etime,
this.explain,
this.status,
this.cdate,
this.receiveNum,
this.useNum,
this.nickname,
this.uidList,
this.isExamine,
this.isType,
this.isOpen,
this.isOpenBool,
this.price,
this.use,
this.arule,
this.expDate,
this.nickNameShow,
this.grantNum,
this.urllink,
this.liteQrcode,
// this.aexpiration,
this.number,
this.aexpiration,
this.expirationDate,
);
factory CouponSunModel.fromJson(Map<String, dynamic> srcJson) =>
_$CouponSunModelFromJson(srcJson);
... ... @@ -228,17 +227,17 @@ class Arule extends Object {
// String commission;
Arule(
this.isSameDay,
this.isAccumulation,
this.isCompartment,
this.isEatin,
this.isTakeout,
this.isAppointment,
this.isShareLose,
this.isShareHave,
// this.isCommission,
// this.commission
);
this.isSameDay,
this.isAccumulation,
this.isCompartment,
this.isEatin,
this.isTakeout,
this.isAppointment,
this.isShareLose,
this.isShareHave,
// this.isCommission,
// this.commission
);
factory Arule.fromJson(Map<String, dynamic> srcJson) =>
_$AruleFromJson(srcJson);
... ...
... ... @@ -135,6 +135,20 @@ class _CouponItemState extends State<CouponItem> {
fontWeight: FontWeight.normal)),
),
VEmptyView(20),
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))),
),
(ObjectUtil.isNotEmpty(sunModel.stime) &&
sunModel.stime != '0') ||
(ObjectUtil.isNotEmpty(sunModel.etime) &&
... ...
... ... @@ -79,7 +79,8 @@ class _CouponItemFState extends State<CouponItemF> {
onTap: widget.onPressedSelect,
child: Container(
// color: Colors.red,
padding: EdgeInsets.symmetric(vertical: w(50),horizontal: w(5)),
padding: EdgeInsets.symmetric(
vertical: w(50), horizontal: w(5)),
child: Image.asset(
Utils.getImgPath(sunModel.isCheck
? widget.radio
... ... @@ -420,9 +421,26 @@ class _CouponItemFState extends State<CouponItemF> {
],
),
VEmptyView(16),
(ObjectUtil.isNotEmpty(sunModel.stime) &&
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') ||
(ObjectUtil.isNotEmpty(
(sunModel.isType == '1' &&
ObjectUtil.isNotEmpty(
sunModel.etime) &&
sunModel.etime != '0')
? Container(
... ...
... ... @@ -33,7 +33,8 @@ class PaymentGiftPage extends StatefulWidget {
}
class _PaymentGiftPageState extends State<PaymentGiftPage> {
bool fullReduction = true;
bool fullReduction = false; //默认都不选中
bool stairs = false; //默认都不选中
String fromDateFull = '选择日期';
String endDateFull = '选择日期';
... ... @@ -77,12 +78,9 @@ class _PaymentGiftPageState extends State<PaymentGiftPage> {
.getActivityConfig(context, params, isShowLoading: isShowLoading);
if (financeProvider!.giftData != null) {
//已经设置了数据
fullReduction = financeProvider!.giftData!.fullReduction == '1'
? true
: financeProvider!.giftData!.stairs == '1'
? false
: true;
fullReduction =
financeProvider!.giftData!.fullReduction == '1' ? true : false;
stairs = financeProvider!.giftData!.stairs == '1' ? true : false;
if (financeProvider!.giftData!.fullReductionData != null) {
rule = financeProvider!.giftData!.fullReductionData!.rule == '1'
? true
... ... @@ -155,7 +153,8 @@ class _PaymentGiftPageState extends State<PaymentGiftPage> {
Utils.showToast('请选择满减返券活动的优惠券!');
return;
}
} else {
}
if (stairs) {
//阶梯返券
if (fromDateLadder == '选择日期') {
Utils.showToast('请选择阶梯返券活动的开始时间!');
... ... @@ -254,7 +253,7 @@ class _PaymentGiftPageState extends State<PaymentGiftPage> {
'sellerid':
Provider.of<UserModel>(context, listen: false).user!.sellerid!,
'full_reduction': fullReduction ? '1' : '0',
'stairs': !fullReduction ? '1' : '0',
'stairs': stairs ? '1' : '0',
'full_reduction_data':
fullReductionData.length == 0 ? null : jsonEncode(fullReductionData),
'stairs_data': stairsData.length == 0 ? null : jsonEncode(stairsData),
... ... @@ -521,7 +520,7 @@ class _PaymentGiftPageState extends State<PaymentGiftPage> {
///发放阶梯
Widget _ladderWidget() {
return ListView.builder(
controller: controller,
controller: controller,
shrinkWrap: true,
itemCount: ladderSelectFree.length,
itemBuilder: (context, index) {
... ... @@ -612,12 +611,15 @@ class _PaymentGiftPageState extends State<PaymentGiftPage> {
children: [
Expanded(
child: SingleChildScrollView(
controller: controller,
controller: controller,
child: Column(
children: [
_canUse('开通实际支付满减返券【拉复购】', fullReduction, () {
setState(() {
fullReduction = !fullReduction;
if (fullReduction) {
stairs = false;
}
});
}),
_select('活动开始于', fromDateFull, () {
... ... @@ -799,10 +801,13 @@ class _PaymentGiftPageState extends State<PaymentGiftPage> {
),
),
VEmptyView(22),
_canUse('开通实际支付阶梯返券【提客单】', !fullReduction, () {
_canUse('开通实际支付阶梯返券【提客单】', stairs, () {
//
setState(() {
fullReduction = !fullReduction;
stairs = !stairs;
if (stairs) {
fullReduction = false;
}
});
}),
_select('活动开始于', fromDateLadder, () {
... ...
... ... @@ -33,7 +33,7 @@ import '../../../../utils/screen_util.dart';
*/
class PaymentGiftSelectPage extends StatefulWidget {
final String? type;
final List<CouponSunModel>?couponList;
final List<CouponSunModel>? couponList;
final String? from;
final String? end;
... ... @@ -124,22 +124,28 @@ class _PaymentGiftSelectPageState extends State<PaymentGiftSelectPage> {
// data.stime
// data.etime
//重组数据
// 券开始早于活动开始 && 券结束大于活动结束
DateTime dateTimes = DateTime.fromMillisecondsSinceEpoch(
int.parse(data.stime.toString()) * 1000);
String fromC = DateUtil.formatDate(dateTimes, format: DateFormats.y_mo_d);
DateTime dateTimeseEnd = DateTime.fromMillisecondsSinceEpoch(
int.parse(data.etime.toString()) * 1000);
String endC =
DateUtil.formatDate(dateTimeseEnd, format: DateFormats.y_mo_d);
if (DateUtil.getDateTime(fromC)
.compareTo(DateUtil.getDateTime(widget.from!)) <=
0 &&
DateUtil.getDateTime(widget.end!)
.compareTo(DateUtil.getDateTime(endC)) <=
0) {
if (data.expirationDate?.validForever == '1') {
//长期有效
temp.add(couponProvider.couponListSelect![i]);
} else {
// 券开始早于活动开始 && 券结束大于活动结束
DateTime dateTimes = DateTime.fromMillisecondsSinceEpoch(
int.parse(data.stime.toString()) * 1000);
String fromC =
DateUtil.formatDate(dateTimes, format: DateFormats.y_mo_d);
DateTime dateTimeseEnd = DateTime.fromMillisecondsSinceEpoch(
int.parse(data.etime.toString()) * 1000);
String endC =
DateUtil.formatDate(dateTimeseEnd, format: DateFormats.y_mo_d);
if (DateUtil.getDateTime(fromC)
.compareTo(DateUtil.getDateTime(widget.from!)) <=
0 &&
DateUtil.getDateTime(widget.end!)
.compareTo(DateUtil.getDateTime(endC)) <=
0) {
temp.add(couponProvider.couponListSelect![i]);
}
}
}
couponProvider.couponListSelect = temp;
... ... @@ -285,10 +291,12 @@ class _PaymentGiftSelectPageState extends State<PaymentGiftSelectPage> {
needNum: false,
couponSonModel:
couponProvider.couponListSelect![index],
onPressed: () {
NavigatorUtil.goCouponDetailPage(context, couponProvider.couponListSelect![index],
idStr: couponProvider.couponListSelect![index].id);
},
onPressed: () {
NavigatorUtil.goCouponDetailPage(context,
couponProvider.couponListSelect![index],
idStr: couponProvider
.couponListSelect![index].id);
},
onPressedSelect: () {
// bool old = couponProvider
// .couponListSelect[index].isCheck;
... ...
... ... @@ -4918,6 +4918,7 @@ class DialogUtil {
child: TextField(
controller: controllerMin,
maxLines: 1,
maxLength: 3, // 设置最大输入字符数为3
// //光标颜色
// cursorColor:
// widget.isSelect ? Colors.white : MyColours.color_199095,
... ... @@ -4933,6 +4934,7 @@ class DialogUtil {
.digitsOnly
],
decoration: InputDecoration(
counterText: "",
isCollapsed: true,
contentPadding: EdgeInsets
.zero, //设置文字内容与边框距离
... ... @@ -5003,6 +5005,7 @@ class DialogUtil {
child: TextField(
controller: controllerMax,
maxLines: 1,
maxLength: 3, // 设置最大输入字符数为3
// //光标颜色
// cursorColor:
// widget.isSelect ? Colors.white : MyColours.color_199095,
... ... @@ -5021,6 +5024,7 @@ class DialogUtil {
isCollapsed: true,
contentPadding: EdgeInsets
.zero, //设置文字内容与边框距离
counterText: "", // 隐藏默认的字符计数器
// enabledBorder: UnderlineInputBorder(
// borderSide: BorderSide(
... ... @@ -5523,6 +5527,7 @@ class DialogUtil {
child: TextField(
controller: controllerMin,
maxLines: 1,
maxLength: 3, // 设置最大输入字符数为3
// //光标颜色
// cursorColor:
// widget.isSelect ? Colors.white : MyColours.color_199095,
... ... @@ -5535,6 +5540,7 @@ class DialogUtil {
FilteringTextInputFormatter.digitsOnly
],
decoration: InputDecoration(
counterText: "", // 隐藏默认的字符计数器
isCollapsed: true,
contentPadding:
EdgeInsets.zero, //设置文字内容与边框距离
... ... @@ -5598,6 +5604,7 @@ class DialogUtil {
child: TextField(
controller: controllerMax,
maxLines: 1,
maxLength: 3, // 设置最大输入字符数为3
// //光标颜色
// cursorColor:
// widget.isSelect ? Colors.white : MyColours.color_199095,
... ... @@ -5610,6 +5617,7 @@ class DialogUtil {
FilteringTextInputFormatter.digitsOnly
],
decoration: InputDecoration(
counterText: "", // 隐藏默认的字符计数器
isCollapsed: true,
contentPadding:
EdgeInsets.zero, //设置文字内容与边框距离
... ... @@ -6228,6 +6236,7 @@ class DialogUtil {
child: TextField(
controller: controllerMin,
maxLines: 1,
maxLength: 3, // 设置最大输入字符数为3
// //光标颜色
// cursorColor:
// widget.isSelect ? Colors.white : MyColours.color_199095,
... ... @@ -6240,6 +6249,7 @@ class DialogUtil {
FilteringTextInputFormatter.digitsOnly
],
decoration: InputDecoration(
counterText: "", // 隐藏默认的字符计数器
isCollapsed: true,
contentPadding:
EdgeInsets.zero, //设置文字内容与边框距离
... ... @@ -6303,6 +6313,7 @@ class DialogUtil {
child: TextField(
controller: controllerMax,
maxLines: 1,
maxLength: 3, // 设置最大输入字符数为3
// //光标颜色
// cursorColor:
// widget.isSelect ? Colors.white : MyColours.color_199095,
... ... @@ -6316,6 +6327,7 @@ class DialogUtil {
],
decoration: InputDecoration(
isCollapsed: true,
counterText: "", // 隐藏默认的字符计数器
contentPadding:
EdgeInsets.zero, //设置文字内容与边框距离
... ... @@ -7358,10 +7370,14 @@ class DialogUtil {
TextEditingController controller = TextEditingController();
FocusNode focusNode = FocusNode();
bool showArea = true;
areas.remove('全部');
bool showPnumMin = true;
bool showPnumMax = true;
String pnumMin = '';
String pnumMax = '';
// String pnumMin = '';
// String pnumMax = '';
TextEditingController controllerMax = TextEditingController();
TextEditingController controllerMin = TextEditingController();
// StateSetter globalState;
// //输入框焦点
// focusNode.addListener(() {
... ... @@ -7556,38 +7572,202 @@ class DialogUtil {
color:
MyColours.color_333333),
),
HEmptyView(40),
HEmptyView(5),
// Stack(
// overflow: Overflow.visible,
// children: [
btnChoose(pnumMin,
ScreenUtil().setWidth(54 * 2),
(value) {
state(() {
showArea = true;
showPnumMax = true;
showPnumMin = !showPnumMin;
});
}),
HEmptyView(20),
// btnChoose(pnumMin,
// ScreenUtil().setWidth(54 * 2),
// (value) {
// state(() {
// showArea = true;
// showPnumMax = true;
// showPnumMin = !showPnumMin;
// });
// }),
// HEmptyView(20),
// Text(
// '至',
// style: TextStyle(
// fontSize:
// ScreenUtil().setSp(30),
// color:
// MyColours.color_199095),
// ),
// HEmptyView(20),
// btnChoose(pnumMax,
// ScreenUtil().setWidth(54 * 2),
// (value) {
// state(() {
// showArea = true;
// showPnumMin = true;
// showPnumMax = !showPnumMax;
// });
// }),
Container(
width: w(76),
// margin: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(44)),
height: w(30),
alignment: Alignment.center,
decoration: BoxDecoration(
color:
MyColours.color_f3f3f3,
borderRadius:
BorderRadius.circular(
ScreenUtil()
.setWidth(10))),
child: TextField(
controller: controllerMin,
maxLines: 1,
maxLength: 3, // 设置最大输入字符数为3
// //光标颜色
// cursorColor:
// widget.isSelect ? Colors.white : MyColours.color_199095,
//输入文本的样式
textAlign: TextAlign.center,
style: TextStyle(
fontSize: ScreenUtil()
.setSp(30),
color: MyColours
.color_515151),
inputFormatters: [
FilteringTextInputFormatter
.digitsOnly
],
decoration: InputDecoration(
counterText: "",
isCollapsed: true,
contentPadding: EdgeInsets
.zero, //设置文字内容与边框距离
// enabledBorder: UnderlineInputBorder(
// borderSide: BorderSide(
// color: MyColours.color_efefef),
// ),
// focusedBorder: UnderlineInputBorder(
// borderSide: BorderSide(
// color: MyColours.color_efefef,
// width: ScreenUtil().setWidth(2)),
// ),
// prefixText: '*',
// prefixStyle: TextStyle(
// fontSize: ScreenUtil().setSp(32),
// color: MyColours.color_E95750),
border: OutlineInputBorder(
borderSide:
BorderSide.none),
hintText: '输入最小',
hintStyle: TextStyle(
color: MyColours
.color_BFC4D4,
fontSize: ScreenUtil()
.setSp(30),
),
),
onChanged: (value) {
state(() {});
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(
FocusNode()); //点击空白处隐藏键盘
},
keyboardType:
TextInputType.number,
),
),
// btnChooseTableManagePnum(pnumMin, 'min',
// ScreenUtil().setWidth(54 * 2), (value) {
// state(() {
// showBaojian = true;
// showPnumMax = true;
// showPnumMin = !showPnumMin;
// });
// }),
HEmptyView(10),
Text(
'至',
style: TextStyle(
fontSize:
ScreenUtil().setSp(30),
color:
MyColours.color_199095),
MyColours.color_000000),
),
HEmptyView(10),
Container(
width: w(76),
height: w(30),
alignment: Alignment.center,
decoration: BoxDecoration(
color:
MyColours.color_f3f3f3,
borderRadius:
BorderRadius.circular(
ScreenUtil()
.setWidth(10))),
child: TextField(
controller: controllerMax,
maxLines: 1,
maxLength: 3, // 设置最大输入字符数为3
// //光标颜色
// cursorColor:
// widget.isSelect ? Colors.white : MyColours.color_199095,
//输入文本的样式
textAlign: TextAlign.center,
style: TextStyle(
fontSize: ScreenUtil()
.setSp(30),
color: MyColours
.color_515151),
inputFormatters: [
FilteringTextInputFormatter
.digitsOnly
],
decoration: InputDecoration(
isCollapsed: true,
contentPadding: EdgeInsets
.zero, //设置文字内容与边框距离
counterText:
"", // 隐藏默认的字符计数器
// enabledBorder: UnderlineInputBorder(
// borderSide: BorderSide(
// color: MyColours.color_efefef),
// ),
// focusedBorder: UnderlineInputBorder(
// borderSide: BorderSide(
// color: MyColours.color_efefef,
// width: ScreenUtil().setWidth(2)),
// ),
// prefixText: '*',
// prefixStyle: TextStyle(
// fontSize: ScreenUtil().setSp(32),
// color: MyColours.color_E95750),
border: OutlineInputBorder(
borderSide:
BorderSide.none),
hintText: '输入最大',
hintStyle: TextStyle(
color: MyColours
.color_BFC4D4,
fontSize: ScreenUtil()
.setSp(30),
),
),
onChanged: (value) {
state(() {});
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(
FocusNode()); //点击空白处隐藏键盘
},
keyboardType:
TextInputType.number,
),
),
HEmptyView(20),
btnChoose(pnumMax,
ScreenUtil().setWidth(54 * 2),
(value) {
state(() {
showArea = true;
showPnumMin = true;
showPnumMax = !showPnumMax;
});
}),
],
),
),
... ... @@ -7611,12 +7791,49 @@ class DialogUtil {
//最高人数
// pnumMax
if (controllerMax.text
.trim()
.length >
0 &&
controllerMin.text
.trim()
.length >
0) {
if (int.parse(controllerMin.text
.trim()) >
int.parse(controllerMax.text
.trim())) {
Utils.showToast(
'最大人数不能小于最小人数!');
return;
}
if (int.parse(controllerMin.text
.trim()) ==
0) {
Utils.showToast('最小人数不能为0!');
return;
}
if (int.parse(controllerMax.text
.trim()) ==
0) {
Utils.showToast('最大人数不能为0!');
return;
}
if (int.parse(controllerMax.text
.trim()) >
999) {
Utils.showToast(
'最大人数不能超过999!');
return;
}
}
onTap!({
'areaname':
areas[currentAreaIndex!],
'name': controller.text,
'pnumMin': pnumMin,
'pnumMax': pnumMax
'pnumMin': controllerMin.text,
'pnumMax': controllerMax.text
});
if (Navigator.canPop(context)) {
Navigator.pop(context);
... ... @@ -7667,34 +7884,34 @@ class DialogUtil {
color: Colors.transparent)
],
),
Positioned(
left: ScreenUtil().setWidth(136 * 2),
top: ScreenUtil().setWidth(221 * 2),
child: Offstage(
offstage: showPnumMin,
child: Material(
color: Colors.transparent,
child: selectWidget(pnum, (index) {
state(() {
showPnumMin = !showPnumMin;
pnumMin = pnum[index as int];
});
}),
))),
Positioned(
left: ScreenUtil().setWidth(223 * 2),
top: ScreenUtil().setWidth(221 * 2),
child: Material(
color: Colors.transparent,
child: Offstage(
offstage: showPnumMax,
child: selectWidget(pnum, (index) {
state(() {
showPnumMax = !showPnumMax;
pnumMax = pnum[index as int];
});
}),
))),
// Positioned(
// left: ScreenUtil().setWidth(136 * 2),
// top: ScreenUtil().setWidth(221 * 2),
// child: Offstage(
// offstage: showPnumMin,
// child: Material(
// color: Colors.transparent,
// child: selectWidget(pnum, (index) {
// state(() {
// showPnumMin = !showPnumMin;
// pnumMin = pnum[index as int];
// });
// }),
// ))),
// Positioned(
// left: ScreenUtil().setWidth(223 * 2),
// top: ScreenUtil().setWidth(221 * 2),
// child: Material(
// color: Colors.transparent,
// child: Offstage(
// offstage: showPnumMax,
// child: selectWidget(pnum, (index) {
// state(() {
// showPnumMax = !showPnumMax;
// pnumMax = pnum[index as int];
// });
// }),
// ))),
])));
});
});
... ...
... ... @@ -2530,8 +2530,8 @@ class Utils {
height: 1,
maxLines: 1,
ellipsis: '3',
fontSize: 38));
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
fontSize: 16*scaleX));
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 16*scaleX));
pb2.addText(
'${Provider.of<UserModel>(context, listen: false).user!.sellername}');
... ... @@ -2552,8 +2552,8 @@ class Utils {
fontWeight: FontWeight.bold,
fontStyle: FontStyle.normal,
height: 1,
fontSize: 38));
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
fontSize: 16*scaleX));
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 16*scaleX));
pb.addText(time);
// 设置文本的宽度约束
... ... @@ -2643,8 +2643,9 @@ class Utils {
maxLines: 2,
height: 1,
fontStyle: FontStyle.normal,
fontSize: 42));
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 42));
fontSize: 16 * scaleX));
pb2.pushStyle(
ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 16 * scaleX));
pb2.addText(
'${Provider.of<UserModel>(context, listen: false).user!.sellername}');
... ... @@ -2660,8 +2661,9 @@ class Utils {
fontWeight: FontWeight.bold,
height: 1,
fontStyle: FontStyle.normal,
fontSize: 86));
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 86));
fontSize: 36 * scaleX));
pb3.pushStyle(
ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 36 * scaleX));
pb3.addText(month);
// 设置文本的宽度约束
... ... @@ -2676,8 +2678,9 @@ class Utils {
fontWeight: FontWeight.bold,
fontStyle: FontStyle.normal,
height: 1,
fontSize: 42));
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 42));
fontSize: 16 * scaleX));
pb.pushStyle(
ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 16 * scaleX));
pb.addText(time);
// 设置文本的宽度约束
... ... @@ -2754,8 +2757,9 @@ class Utils {
fontWeight: FontWeight.bold,
fontStyle: FontStyle.normal,
maxLines: 2,
fontSize: 38));
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
fontSize: 16 * scaleX));
pb2.pushStyle(
ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 16 * scaleX));
pb2.addText(
'${Provider.of<UserModel>(context, listen: false).user!.sellername}');
... ... @@ -2770,15 +2774,16 @@ class Utils {
fontWeight: FontWeight.bold,
fontStyle: FontStyle.normal,
height: 1,
fontSize: 88));
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 88));
fontSize: 40 * scaleX));
pb3.pushStyle(
ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 40 * scaleX));
pb3.addText(month);
// 设置文本的宽度约束
ParagraphConstraints pc3 = ui.ParagraphConstraints(width: 270);
ParagraphConstraints pc3 = ui.ParagraphConstraints(width: 300);
ui.Paragraph paragraph3 = pb3.build()..layout(pc3);
canvas.drawParagraph(
paragraph3, Offset(images.width - 340, images.height - 180));
paragraph3, Offset(images.width - 380, images.height - 190));
// 绘制文字
ui.ParagraphBuilder pb4 = ui.ParagraphBuilder(ui.ParagraphStyle(
... ... @@ -2786,8 +2791,9 @@ class Utils {
height: 1,
fontWeight: FontWeight.bold,
fontStyle: FontStyle.normal,
fontSize: 38));
pb4.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
fontSize: 16 * scaleX));
pb4.pushStyle(
ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 16 * scaleX));
pb4.addText(week);
// 设置文本的宽度约束
... ... @@ -2797,8 +2803,8 @@ class Utils {
paragraph4, Offset(images.width - 70, images.height - 180));
Rect rect = subType1 == '1'
? Rect.fromLTWH(images.width - 250, images.height - 90, 220, 50)
: Rect.fromLTWH(158 * scaleX, images.height - 90, 40 * scaleX, 50);
? Rect.fromLTWH(images.width - 255 - 10, images.height - 90, 240, 50)
: Rect.fromLTWH(150 * scaleX, images.height - 90, 50 * scaleX, 50);
paint.color = MyColours.color_66FFEFC5;
RRect rRect = RRect.fromRectAndRadius(rect, Radius.circular(6));
canvas.drawRRect(rRect, paint);
... ... @@ -2810,15 +2816,16 @@ class Utils {
fontWeight: FontWeight.bold,
height: 1,
fontStyle: FontStyle.normal,
fontSize: 38));
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
fontSize: 16 * scaleX));
pb.pushStyle(
ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 16 * scaleX));
pb.addText(time);
// 设置文本的宽度约束
double width = subType1 == '1' ? 240 : 40 * scaleX;
double width = subType1 == '1' ? 240 : 50 * scaleX;
Offset offset = subType1 == '1'
? Offset(images.width - 260, images.height - 80)
: Offset(158 * scaleX, images.height - 80);
? Offset(images.width - 258 - 10, images.height - 80)
: Offset(150 * scaleX, images.height - 80);
ParagraphConstraints pc = ui.ParagraphConstraints(width: width);
ui.Paragraph paragraph = pb.build()..layout(pc);
canvas.drawParagraph(paragraph, offset);
... ... @@ -2892,8 +2899,9 @@ class Utils {
fontWeight: FontWeight.bold,
fontStyle: FontStyle.normal,
maxLines: 1,
fontSize: 38));
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
fontSize: scaleX * 16));
pb2.pushStyle(
ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: scaleX * 16));
pb2.addText(
'${Provider.of<UserModel>(context, listen: false).user!.sellername}');
... ... @@ -2909,15 +2917,16 @@ class Utils {
height: 1,
fontWeight: FontWeight.bold,
fontStyle: FontStyle.normal,
fontSize: 38));
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
fontSize: scaleX * 16));
pb3.pushStyle(
ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: scaleX * 16));
pb3.addText(month + week);
// 设置文本的宽度约束
ParagraphConstraints pc3 = ui.ParagraphConstraints(width: 240);
ui.Paragraph paragraph3 = pb3.build()..layout(pc3);
canvas.drawParagraph(paragraph3,
Offset(subType1 == '1' ? 17 * scaleX : 35 * scaleX, 146 * scaleY));
Offset(subType1 == '1' ? 14 * scaleX : 35 * scaleX, 146 * scaleY));
// // 绘制文字
// ui.ParagraphBuilder pb4 = ui.ParagraphBuilder(ui.ParagraphStyle(
... ... @@ -2934,8 +2943,8 @@ class Utils {
// ui.Paragraph paragraph4 = pb4.build()..layout(pc4);
// canvas.drawParagraph(paragraph4, Offset(420, 320));
Rect rect = Rect.fromLTWH(subType1 == '1' ? 107 * scaleX : 127 * scaleX,
142 * scaleY, subType1 == '1' ? 80 * scaleX : 40 * scaleX, 20 * scaleY);
Rect rect = Rect.fromLTWH(subType1 == '1' ? 113 * scaleX : 132 * scaleX,
142 * scaleY, subType1 == '1' ? 83 * scaleX : 45 * scaleX, 20 * scaleY);
paint.color = MyColours.color_66FFEFC5;
RRect rRect = RRect.fromRectAndRadius(rect, Radius.circular(6));
canvas.drawRRect(rRect, paint);
... ... @@ -2948,23 +2957,24 @@ class Utils {
fontWeight: FontWeight.bold,
height: 1,
fontStyle: FontStyle.normal,
fontSize: 38));
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
fontSize: scaleX * 16));
pb.pushStyle(
ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: scaleX * 16));
pb.addText(time);
// 设置文本的宽度约束
Offset offset = subType1 == '1'
? Offset(
103 * scaleX,
110 * scaleX,
146 * scaleY,
)
: Offset(
126 * scaleX,
131 * scaleX,
146 * scaleY,
);
ParagraphConstraints pc = ui.ParagraphConstraints(
width: subType1 == '1' ? 87 * scaleX : 41 * scaleX);
width: subType1 == '1' ? 87 * scaleX : 46 * scaleX);
ui.Paragraph paragraph = pb.build()..layout(pc);
canvas.drawParagraph(paragraph, offset);
... ... @@ -3030,8 +3040,9 @@ class Utils {
fontWeight: FontWeight.normal,
fontStyle: FontStyle.normal,
height: 1,
fontSize: 28));
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 28));
fontSize: scaleX * 12));
pb2.pushStyle(
ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: scaleX * 12));
pb2.addText(
'${Provider.of<UserModel>(context, listen: false).user!.sellername}');
... ... @@ -3047,8 +3058,9 @@ class Utils {
fontWeight: FontWeight.bold,
height: 1,
fontStyle: FontStyle.normal,
fontSize: 72));
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 72));
fontSize: scaleX * 36));
pb.pushStyle(
ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: scaleX * 36));
pb.addText(month);
// 设置文本的宽度约束
... ... @@ -3063,8 +3075,9 @@ class Utils {
height: 1,
fontWeight: FontWeight.bold,
fontStyle: FontStyle.normal,
fontSize: 36));
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 36));
fontSize: scaleX * 18));
pb3.pushStyle(
ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: scaleX * 18));
pb3.addText(week);
// 设置文本的宽度约束
... ...