phase3: nullfix arg-bang handler (argument_type/invalid_assignment). 872 -> 621

This commit is contained in:
2026-07-25 18:16:40 +08:00
parent c21ccbd54d
commit a76b872966
65 changed files with 282 additions and 257 deletions

View File

@@ -306,7 +306,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
mainAxisSize: MainAxisSize.min,
children: [
Text(
S.of(context).table_token(store.state.tableNumber),
S.of(context).table_token(store.state.tableNumber!),
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
@@ -358,7 +358,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
icons: shippingMethodIcons,
onToggle: (index) {
selectedShippingRate = null;
deliveryMethod = getShippingMethod(index);
deliveryMethod = getShippingMethod(index!);
check();
},
initialLabelIndex: deliveryMethodIndex,
@@ -652,7 +652,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
children: <Widget>[
Container(
child: Text(
bookingTimeList.length > 0 ? '${Utils.timestampToString(context, bookingTimeList[bookingTimeIndex].unixTime)}'
bookingTimeList.length > 0 ? '${Utils.timestampToString(context, bookingTimeList[bookingTimeIndex].unixTime!)}'
: ((bookingTimeList.length == 0 && bookingDateTimeList.length == 0) ? ''
: bookingDateTimeList[bookingDateIndex].viewDate! + ' ' + (bookingDateTimeList[bookingDateIndex].bookTimes!.length > 0 ? bookingDateTimeList[bookingDateIndex].bookTimes![bookingTimeIndex].viewTime : '')),
),
@@ -706,7 +706,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
children: <Widget>[
Container(
child: Text(
paymentPlatforms.length == 0 ? S.of(context).pay_on_deliery : PaymentPlatform.getPaymentPlatformName(context, paymentPlatforms[paymentPlatformIndex].code),
paymentPlatforms.length == 0 ? S.of(context).pay_on_deliery : PaymentPlatform.getPaymentPlatformName(context, paymentPlatforms[paymentPlatformIndex].code!),
),
),
Container(
@@ -1013,14 +1013,14 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
children: <Widget>[
Container(
child: Text(
Utils.knownName(context, cartLineItem.name),
Utils.knownName(context, cartLineItem.name!),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
Container(
child: Text(
cartLineItem.description,
cartLineItem.description!,
style: TextStyle(
fontSize: 12.0,
color: Colors.black38,
@@ -1180,7 +1180,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
column.children.add(Container(
padding: EdgeInsets.only(left: 0.0, right: 0.0, top: 10.0, bottom: 0.0),
child: Text(
Utils.errorMsg2(context, messages[i].code, messages[i].string),
Utils.errorMsg2(context, messages[i].code!, messages[i].string!),
),
));
}
@@ -1240,7 +1240,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
child: Container(
padding: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 10.0, top: 10.0),
child: Text(
'${Utils.timestampToString(context, bookingTime.unixTime)}',
'${Utils.timestampToString(context, bookingTime.unixTime!)}',
),
decoration: BoxDecoration(
border: Border(
@@ -1315,7 +1315,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
padding: EdgeInsets.only(left: 10.0, right: 10.0, top: 10.0, bottom: 10.0),
child: Center(
child: Text(
'${bookingDateTime.viewDate} (${Utils.getWeekDayName(context, bookingDateTime.unixTime, true)})',
'${bookingDateTime.viewDate} (${Utils.getWeekDayName(context, bookingDateTime.unixTime!, true)})',
),
),
),
@@ -1519,7 +1519,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
child: Util.showImage(paymentPlatform.icon,
child: Util.showImage(paymentPlatform.icon!,
errorWidget: (context, url, error) => Icon(Icons.broken_image, size: 50.0, color: Colors.transparent,),
fit: BoxFit.cover,
width: 50.0,
@@ -1529,7 +1529,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
Container(
margin: EdgeInsets.only(left: 10.0),
child: Text(
PaymentPlatform.getPaymentPlatformName(context, paymentPlatform.code),
PaymentPlatform.getPaymentPlatformName(context, paymentPlatform.code!),
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.bold,
@@ -1807,7 +1807,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
Container(
padding: EdgeInsets.only(right: 5.0),
child: Text(
'${Utils.smartRound(coupon.valueAmount, 2)}',
'${Utils.smartRound(coupon.valueAmount!, 2)}',
style: TextStyle(
fontSize: 30.0,
color: Colors.redAccent,
@@ -1843,7 +1843,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
),
Container(
child: Text(
'${Utils.smartRound(coupon.valueAmount, 2)}',
'${Utils.smartRound(coupon.valueAmount!, 2)}',
style: TextStyle(
fontSize: 30.0,
color: Colors.redAccent,
@@ -1871,7 +1871,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
child: Text(
coupon.expirationDate != null ?
S.of(context).expiration_date_token(
coupon.expirationDate) :
coupon.expirationDate!) :
S.of(context)
.no_expiration,
style: TextStyle(
@@ -1884,7 +1884,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
child: Text(
coupon.minAmount! > 0 ?
S.of(context).min_order_amount_token(
coupon.minAmount) :
coupon.minAmount!) :
S.of(context)
.no_restriction,
style: TextStyle(
@@ -2126,7 +2126,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
left: 16.0, top: 16.0, right: 16.0, bottom: 16.0),
child: Container(
child: Text(
shippingRate.name,
shippingRate.name!,
style: TextStyle(
fontSize: 20.0,
),