|
|
|
@ -104,14 +104,16 @@ class _WriteOffPage extends State<WriteOffPage> {
|
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
alignment: Alignment.topCenter, |
|
|
|
|
height: 530.h, |
|
|
|
|
height: 470.h, |
|
|
|
|
// height:530.h |
|
|
|
|
child: Stack( |
|
|
|
|
alignment: Alignment.topCenter, |
|
|
|
|
children: [ |
|
|
|
|
Image.asset( |
|
|
|
|
"assets/image/write_off_bg.webp", |
|
|
|
|
width: MediaQuery.of(context).size.width * 0.912, |
|
|
|
|
height: 540.h, |
|
|
|
|
height: 480.h, |
|
|
|
|
// height:540.h |
|
|
|
|
fit: BoxFit.fill, |
|
|
|
|
), |
|
|
|
|
LayoutBuilder(builder: (context, constraints) { |
|
|
|
@ -163,47 +165,47 @@ class _WriteOffPage extends State<WriteOffPage> {
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
coupon != null |
|
|
|
|
? "${coupon["memberCouponId"].substring(0, 4)} " |
|
|
|
|
"${coupon["memberCouponId"].substring(4, 8)} " |
|
|
|
|
"${coupon["memberCouponId"].substring(8, 12)} " |
|
|
|
|
"${coupon["memberCouponId"].substring(12, 16)} " |
|
|
|
|
"${coupon["memberCouponId"].substring(16, coupon["memberCouponId"].length)}" |
|
|
|
|
: "", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
wordSpacing: coupon == null |
|
|
|
|
? 10 |
|
|
|
|
: (MediaQuery.of(context).size.width - |
|
|
|
|
64.w) / |
|
|
|
|
(((coupon["memberCouponId"].length) * 4)), |
|
|
|
|
letterSpacing: coupon == null |
|
|
|
|
? 8 |
|
|
|
|
: (MediaQuery.of(context).size.width - |
|
|
|
|
64.w) / |
|
|
|
|
(((coupon["memberCouponId"].length) * 4)), |
|
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 15.h, |
|
|
|
|
), |
|
|
|
|
BarcodeWidget( |
|
|
|
|
barcode: Barcode.code128(useCode128C: true), |
|
|
|
|
data: coupon != null ? coupon["memberCouponId"] : "", |
|
|
|
|
height: 72.h, |
|
|
|
|
color: Colors.black, |
|
|
|
|
drawText: false, |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 16.h, |
|
|
|
|
), |
|
|
|
|
// Text( |
|
|
|
|
// coupon != null |
|
|
|
|
// ? "${coupon["memberCouponId"].substring(0, 4)} " |
|
|
|
|
// "${coupon["memberCouponId"].substring(4, 8)} " |
|
|
|
|
// "${coupon["memberCouponId"].substring(8, 12)} " |
|
|
|
|
// "${coupon["memberCouponId"].substring(12, 16)} " |
|
|
|
|
// "${coupon["memberCouponId"].substring(16, coupon["memberCouponId"].length)}" |
|
|
|
|
// : "", |
|
|
|
|
// style: TextStyle( |
|
|
|
|
// fontSize: 14.sp, |
|
|
|
|
// wordSpacing: coupon == null |
|
|
|
|
// ? 10 |
|
|
|
|
// : (MediaQuery.of(context).size.width - |
|
|
|
|
// 64.w) / |
|
|
|
|
// (((coupon["memberCouponId"].length) * 4)), |
|
|
|
|
// letterSpacing: coupon == null |
|
|
|
|
// ? 8 |
|
|
|
|
// : (MediaQuery.of(context).size.width - |
|
|
|
|
// 64.w) / |
|
|
|
|
// (((coupon["memberCouponId"].length) * 4)), |
|
|
|
|
// fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
// color: Color(0xFF353535), |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// SizedBox( |
|
|
|
|
// height: 15.h, |
|
|
|
|
// ), |
|
|
|
|
// BarcodeWidget( |
|
|
|
|
// barcode: Barcode.code128(useCode128C: true), |
|
|
|
|
// data: coupon != null ? coupon["memberCouponId"] : "", |
|
|
|
|
// height: 72.h, |
|
|
|
|
// color: Colors.black, |
|
|
|
|
// drawText: false, |
|
|
|
|
// ), |
|
|
|
|
// SizedBox( |
|
|
|
|
// height: 16.h, |
|
|
|
|
// ), |
|
|
|
|
Expanded(child: QrImage( |
|
|
|
|
data: "{\"type\":\"wiped\",\"memberCouponId\":\"${coupon["memberCouponId"]}\"}", |
|
|
|
|
version: QrVersions.auto, |
|
|
|
|
size: 200.w, |
|
|
|
|
size: 250.w, |
|
|
|
|
gapless: true, |
|
|
|
|
),), |
|
|
|
|
SizedBox( |
|
|
|
@ -485,54 +487,54 @@ class _WriteOffPage extends State<WriteOffPage> {
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
width: 3.w, |
|
|
|
|
height: 15.h, |
|
|
|
|
margin: |
|
|
|
|
EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(3), |
|
|
|
|
color: Color(0xFF20662A), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).shiyongtiaojian, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
// Row( |
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
// children: [ |
|
|
|
|
// Container( |
|
|
|
|
// width: 3.w, |
|
|
|
|
// height: 15.h, |
|
|
|
|
// margin: |
|
|
|
|
// EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h), |
|
|
|
|
// decoration: BoxDecoration( |
|
|
|
|
// borderRadius: BorderRadius.circular(3), |
|
|
|
|
// color: Color(0xFF20662A), |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// Text( |
|
|
|
|
// S.of(context).shiyongtiaojian, |
|
|
|
|
// style: TextStyle( |
|
|
|
|
// fontWeight: FontWeight.bold, |
|
|
|
|
// fontSize: 14.sp, |
|
|
|
|
// color: Color(0xFF353535), |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// ], |
|
|
|
|
// ), |
|
|
|
|
// SizedBox(height:12.h,), |
|
|
|
|
// Row( |
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
// children: [ |
|
|
|
|
// SizedBox( |
|
|
|
|
// width: 11.w, |
|
|
|
|
// ), |
|
|
|
|
// Expanded( |
|
|
|
|
// child: Text( |
|
|
|
|
// S |
|
|
|
|
// .of(context) |
|
|
|
|
// .qianwanghuixiangmendianduihuanhexiao, |
|
|
|
|
// style: TextStyle( |
|
|
|
|
// textBaseline: TextBaseline.alphabetic, |
|
|
|
|
// fontSize: 14.sp, |
|
|
|
|
// height: 1.5.h, |
|
|
|
|
// color: Color(0xFF353535)), |
|
|
|
|
// ), |
|
|
|
|
// flex: 1, |
|
|
|
|
// ), |
|
|
|
|
// ], |
|
|
|
|
// ), |
|
|
|
|
SizedBox(height:12.h,), |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
SizedBox( |
|
|
|
|
width: 11.w, |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
S |
|
|
|
|
.of(context) |
|
|
|
|
.qianwanghuixiangmendianduihuanhexiao, |
|
|
|
|
style: TextStyle( |
|
|
|
|
textBaseline: TextBaseline.alphabetic, |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
height: 1.5.h, |
|
|
|
|
color: Color(0xFF353535)), |
|
|
|
|
), |
|
|
|
|
flex: 1, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox(height:16.h,), |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|