phase3: nullfix.py batch script — bang/late/param-nullable
Automated null-safety fixes driven by dart analyze (no corruption): - unchecked_use_of_nullable_value: insert '!' on receiver (property/method/[]/op) - not_initialized field/var: mark 'late' - missing_default_value_for_parameter: nullable param Errors: 2374(peak) -> 907
This commit is contained in:
@@ -222,7 +222,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'\$${(cartInfo.totalPrice - couponDiscountAmount).toStringAsFixed(2)}',
|
||||
'\$${(cartInfo.totalPrice! - couponDiscountAmount).toStringAsFixed(2)}',
|
||||
style: TextStyle(
|
||||
fontSize: 20.0,
|
||||
color: Colors.white,
|
||||
@@ -292,7 +292,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
itemCount: 6,
|
||||
addAutomaticKeepAlives: true,
|
||||
itemBuilder: (BuildContext context, int position) {
|
||||
var deliveryTimeInSeconds = cartInfo.businessInfo.shippingTime * 60 + (durationInTraffic != null ? durationInTraffic.value : 0);
|
||||
var deliveryTimeInSeconds = cartInfo!.businessInfo!.shippingTime! * 60 + (durationInTraffic != null ? durationInTraffic!.value : 0);
|
||||
print('aaa: $deliveryTimeInSeconds');
|
||||
DateTime now = DateTime.now();
|
||||
var formatter = DateFormat('H:mm');
|
||||
@@ -366,7 +366,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
);
|
||||
switch (position) {
|
||||
case 0:
|
||||
if (cartInfo.businessInfo.deliveryPickup) {
|
||||
if (cartInfo!.businessInfo!.deliveryPickup) {
|
||||
return Container(
|
||||
padding: EdgeInsets.only(
|
||||
top: 16.0, bottom: 16.0, left: 16.0, right: 16.0),
|
||||
@@ -380,8 +380,8 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
),
|
||||
child: Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: store.state.deviceId != null && store.state.deviceId.isNotEmpty ? (
|
||||
store.state.tableNumber != null && store.state.tableNumber.isNotEmpty ?
|
||||
child: store.state.deviceId != null && store.state.deviceId!.isNotEmpty ? (
|
||||
store.state.tableNumber != null && store.state.tableNumber!.isNotEmpty ?
|
||||
peopleCountSelection :
|
||||
SizedBox.shrink()
|
||||
) : Center(child: toggleSwitch,),
|
||||
@@ -394,8 +394,8 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (store.state.deviceId != null && store.state.deviceId.isNotEmpty ||
|
||||
store.state.tableNumber != null && store.state.tableNumber.isNotEmpty) {
|
||||
if (store.state.deviceId != null && store.state.deviceId!.isNotEmpty ||
|
||||
store.state.tableNumber != null && store.state.tableNumber!.isNotEmpty) {
|
||||
return SizedBox.shrink();
|
||||
}
|
||||
if (deliveryMethod == 'pickup') {
|
||||
@@ -414,7 +414,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.0),
|
||||
child: Text(
|
||||
cartInfo.businessInfo.name,
|
||||
cartInfo!.businessInfo!.name,
|
||||
style: TextStyle(
|
||||
fontSize: 17.0,
|
||||
),
|
||||
@@ -423,7 +423,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 5.0),
|
||||
child: Text(
|
||||
cartInfo.businessInfo.address.addressLine1,
|
||||
cartInfo!.businessInfo!.address!.addressLine1,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.black45,
|
||||
@@ -431,9 +431,9 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child: cartInfo.businessInfo.address.addressLine2 != null
|
||||
&& cartInfo.businessInfo.address.addressLine2.length > 0 ?
|
||||
Text(cartInfo.businessInfo.address.addressLine2,
|
||||
child: cartInfo!.businessInfo!.address!.addressLine2 != null
|
||||
&& cartInfo!.businessInfo!.address!.addressLine2!.length > 0 ?
|
||||
Text(cartInfo!.businessInfo!.address!.addressLine2,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.black45,
|
||||
@@ -442,7 +442,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
'${cartInfo.businessInfo.address.city}, ${cartInfo.businessInfo.address.state}, ${cartInfo.businessInfo.address.zip}',
|
||||
'${cartInfo!.businessInfo!.address!.city}, ${cartInfo!.businessInfo!.address!.state}, ${cartInfo!.businessInfo!.address!.zip}',
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.black45,
|
||||
@@ -452,7 +452,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 5.0),
|
||||
child: Text(
|
||||
'Tel: ${cartInfo.businessInfo.phone}',
|
||||
'Tel: ${cartInfo!.businessInfo!.phone}',
|
||||
style: TextStyle(
|
||||
fontSize: 15.0,
|
||||
color: Colors.black54,
|
||||
@@ -494,7 +494,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
children: <Widget>[
|
||||
Container(
|
||||
child: Text(
|
||||
shipAddress != null ? shipAddress.fullAddress : S.of(context).enter_delivery_address,
|
||||
shipAddress != null ? shipAddress!.fullAddress : S.of(context).enter_delivery_address,
|
||||
style: TextStyle(
|
||||
fontSize: 16.0
|
||||
),
|
||||
@@ -505,7 +505,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 6.0),
|
||||
child: Text(
|
||||
shipAddress != null ? shipAddress.contactName + ' ' + shipAddress.phone : '',
|
||||
shipAddress != null ? shipAddress!.contactName! + ' ' + shipAddress!.phone : '',
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.black38,
|
||||
@@ -529,13 +529,13 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
Routes.router.navigateTo(context, '/my-addresses/${cartInfo.businessInfo.id}', replace: true);
|
||||
Routes.router.navigateTo(context, '/my-addresses/${cartInfo!.businessInfo!.id}', replace: true);
|
||||
},
|
||||
);
|
||||
break;
|
||||
case 2:
|
||||
if (deliveryMethod == 'pickup' || store.state.deviceId != null && store.state.deviceId.isNotEmpty ||
|
||||
store.state.tableNumber != null && store.state.tableNumber.isNotEmpty) {
|
||||
if (deliveryMethod == 'pickup' || store.state.deviceId != null && store.state.deviceId!.isNotEmpty ||
|
||||
store.state.tableNumber != null && store.state.tableNumber!.isNotEmpty) {
|
||||
return SizedBox.shrink();
|
||||
}
|
||||
if (deliveryMethod == 'canada-post') {
|
||||
@@ -578,7 +578,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
selectedShippingRate != null ?
|
||||
'${selectedShippingRate.name} \$${selectedShippingRate.price.toStringAsFixed(2)}' :
|
||||
'${selectedShippingRate!.name} \$${selectedShippingRate!.price!.toStringAsFixed(2)}' :
|
||||
S.of(context).please_select,
|
||||
style: TextStyle(
|
||||
fontSize: 15.0,
|
||||
@@ -608,7 +608,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
},
|
||||
);
|
||||
}
|
||||
if (!cartInfo.businessInfo.instanceDelivery) {
|
||||
if (!cartInfo!.businessInfo!.instanceDelivery) {
|
||||
return Container(
|
||||
padding: EdgeInsets.only(left: 16.0, right: 16.0, top: 0.0, bottom: 16.0),
|
||||
child: Text(S.of(context).no_instance_delivery_desc),
|
||||
@@ -654,7 +654,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
child: Text(
|
||||
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 : '')),
|
||||
: bookingDateTimeList[bookingDateIndex].viewDate! + ' ' + (bookingDateTimeList[bookingDateIndex].bookTimes!.length > 0 ? bookingDateTimeList[bookingDateIndex].bookTimes![bookingTimeIndex].viewTime : '')),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
@@ -737,7 +737,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.only(bottom: 10.0),
|
||||
child: Text(
|
||||
cartInfo.businessInfo.name,
|
||||
cartInfo!.businessInfo!.name,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
@@ -756,9 +756,9 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
|
||||
subtotal = 0.0;
|
||||
|
||||
for (var i = 0; i < cartInfo.productList.length; i++) {
|
||||
subtotal += cartInfo.productList[i].totalPrice;
|
||||
column.children.add(lineItem(cartInfo.productList[i]));
|
||||
for (var i = 0; i < cartInfo!.productList!.length; i++) {
|
||||
subtotal += cartInfo!.productList![i].totalPrice;
|
||||
column.children.add(lineItem(cartInfo!.productList![i]));
|
||||
}
|
||||
column.children.add(GestureDetector(
|
||||
child: Container(
|
||||
@@ -851,8 +851,8 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
),
|
||||
));
|
||||
|
||||
if (cartInfo.extraFeeList.length > 0) {
|
||||
for (var i = 0; i < cartInfo.extraFeeList.length; i++) {
|
||||
if (cartInfo!.extraFeeList!.length > 0) {
|
||||
for (var i = 0; i < cartInfo!.extraFeeList!.length; i++) {
|
||||
column.children.add(Container(
|
||||
padding: EdgeInsets.only(bottom: 16.0),
|
||||
alignment: Alignment.centerRight,
|
||||
@@ -863,7 +863,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
Container(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
S.of(context).extra_fee_token(cartInfo.extraFeeList[i].name, cartInfo.extraFeeList[i].rate),
|
||||
S.of(context).extra_fee_token(cartInfo!.extraFeeList![i].name, cartInfo!.extraFeeList![i].rate),
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
),
|
||||
@@ -873,7 +873,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
width: 100.0,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
'${cartInfo.extraFeeList[i].price.toStringAsFixed(2)}'
|
||||
'${cartInfo!.extraFeeList![i].price!.toStringAsFixed(2)}'
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -901,7 +901,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
width: 100.0,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
'${(cartInfo.totalPrice - couponDiscountAmount).toStringAsFixed(2)}',
|
||||
'${(cartInfo!.totalPrice! - couponDiscountAmount).toStringAsFixed(2)}',
|
||||
style: TextStyle(
|
||||
fontSize: 19.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -999,7 +999,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.all(5.0),
|
||||
child: Util.showImage('${cartLineItem.product.imagePath}',
|
||||
child: Util.showImage('${cartLineItem.product!.imagePath}',
|
||||
width: 80.0,
|
||||
height: 80.0,
|
||||
fit: BoxFit.fill,
|
||||
@@ -1036,14 +1036,14 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
alignment: Alignment.centerRight,
|
||||
margin: EdgeInsets.only(right: 10.0),
|
||||
child: Text(
|
||||
'x${cartLineItem.quantity.round()}',
|
||||
'x${cartLineItem.quantity!.round()}',
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 60.0,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
'${cartLineItem.totalPrice.toStringAsFixed(2)}',
|
||||
'${cartLineItem.totalPrice!.toStringAsFixed(2)}',
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -1099,7 +1099,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
shippingRates = (response.data['shipping_rates'] as List).map((e) => ShippingRate.fromJson(e)).toList();
|
||||
selectedShippingRate = (response.data['selected_shipping_rate'] as String).length > 0 ? ShippingRate.fromJson(json.decode(response.data['selected_shipping_rate'])) : null;
|
||||
int i = 0;
|
||||
if (cartInfo.businessInfo.deliveryStoreDelivery) {
|
||||
if (cartInfo!.businessInfo!.deliveryStoreDelivery) {
|
||||
shippingMethodLabels.add(S.of(context).delivery);
|
||||
shippingMethodIcons.add(Icons.directions_car);
|
||||
if (deliveryMethod == 'store-delivery') {
|
||||
@@ -1107,7 +1107,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (cartInfo.businessInfo.deliveryCanadaPost) {
|
||||
if (cartInfo!.businessInfo!.deliveryCanadaPost) {
|
||||
shippingMethodLabels.add(S.of(context).canada_post);
|
||||
shippingMethodIcons.add(Icons.local_shipping);
|
||||
if (deliveryMethod == 'canada-post') {
|
||||
@@ -1115,7 +1115,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (cartInfo.businessInfo.deliveryPickup) {
|
||||
if (cartInfo!.businessInfo!.deliveryPickup) {
|
||||
shippingMethodLabels.add(S.of(context).pickup);
|
||||
shippingMethodIcons.add(Icons.store);
|
||||
if (deliveryMethod == 'pickup') {
|
||||
@@ -1335,14 +1335,14 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
Expanded(
|
||||
child: SizedBox.expand(
|
||||
child: ListView.builder(
|
||||
itemCount: bookingDateTimeList[bookingDateIndex].bookTimes.length,
|
||||
itemCount: bookingDateTimeList[bookingDateIndex].bookTimes!.length,
|
||||
itemBuilder: (BuildContext context, int position) {
|
||||
BookingDateTime bookingDateTime = bookingDateTimeList[bookingDateIndex];
|
||||
return GestureDetector(
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0, bottom: 12.0),
|
||||
child: Text(
|
||||
bookingDateTime.bookTimes[position].viewTime,
|
||||
bookingDateTime.bookTimes![position].viewTime,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
@@ -1467,16 +1467,16 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
itemBuilder: (BuildContext context, int position) {
|
||||
PaymentPlatform paymentPlatform = paymentPlatforms[position];
|
||||
if (paymentPlatform.code == Constants.PAYMENT_METHOD_CODE_SQUARE &&
|
||||
(paymentPlatform.squareAppId == null || paymentPlatform.squareAppId.isEmpty) &&
|
||||
(paymentPlatform.squareAccessToken == null || paymentPlatform.squareAccessToken.isEmpty) &&
|
||||
(paymentPlatform.squareLocationId == null || paymentPlatform.squareLocationId.isEmpty)
|
||||
(paymentPlatform.squareAppId == null || paymentPlatform.squareAppId!.isEmpty) &&
|
||||
(paymentPlatform.squareAccessToken == null || paymentPlatform.squareAccessToken!.isEmpty) &&
|
||||
(paymentPlatform.squareLocationId == null || paymentPlatform.squareLocationId!.isEmpty)
|
||||
) {
|
||||
return SizedBox.shrink();
|
||||
}
|
||||
if (paymentPlatform.code == Constants.PAYMENT_METHOD_CODE_CHASE &&
|
||||
(paymentPlatform.xLogin == null || paymentPlatform.xLogin.isEmpty) &&
|
||||
(paymentPlatform.transactionKey == null || paymentPlatform.transactionKey.isEmpty) &&
|
||||
(paymentPlatform.responseKey == null || paymentPlatform.responseKey.isEmpty)
|
||||
(paymentPlatform.xLogin == null || paymentPlatform.xLogin!.isEmpty) &&
|
||||
(paymentPlatform.transactionKey == null || paymentPlatform.transactionKey!.isEmpty) &&
|
||||
(paymentPlatform.responseKey == null || paymentPlatform.responseKey!.isEmpty)
|
||||
) {
|
||||
return SizedBox.shrink();
|
||||
}
|
||||
@@ -1566,7 +1566,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
|
||||
String getSelectedCouponName() {
|
||||
if (selectedCoupon == null) {
|
||||
if (coupons.length > 0) {
|
||||
if (coupons!.length > 0) {
|
||||
return S
|
||||
.of(context)
|
||||
.please_select;
|
||||
@@ -1578,10 +1578,10 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
} else if (selectedCoupon == 0) {
|
||||
return S.of(context).dont_use;
|
||||
} else {
|
||||
for (var i = 0; i < coupons.length; i++) {
|
||||
if (selectedCoupon == coupons[i].id) {
|
||||
if (coupons[i].isPercentage) {
|
||||
return S.of(context).percentage_discount_token2(couponDiscountAmount.toStringAsFixed(2), coupons[i].valueAmount);
|
||||
for (var i = 0; i < coupons!.length; i++) {
|
||||
if (selectedCoupon == coupons![i].id) {
|
||||
if (coupons![i].isPercentage) {
|
||||
return S.of(context).percentage_discount_token2(couponDiscountAmount.toStringAsFixed(2), coupons![i].valueAmount);
|
||||
} else {
|
||||
return S.of(context).discount_amount_token(couponDiscountAmount.toStringAsFixed(2));
|
||||
}
|
||||
@@ -1700,13 +1700,13 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
} else {
|
||||
widget.children.add(Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: coupons.length + 1,
|
||||
itemCount: coupons!.length + 1,
|
||||
itemBuilder: (BuildContext context, int position) {
|
||||
if (position == 0) {
|
||||
return GestureDetector(
|
||||
child: Container(
|
||||
decoration: selectedCoupon == 0 ? BoxDecoration(
|
||||
color: subtotal > cartInfo.businessInfo.minPrice ? Colors
|
||||
color: subtotal > cartInfo!.businessInfo!.minPrice ? Colors
|
||||
.transparent : Colors.black38,
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
@@ -1727,7 +1727,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
),
|
||||
),
|
||||
) : BoxDecoration(
|
||||
color: subtotal > cartInfo.businessInfo.minPrice ? Colors
|
||||
color: subtotal > cartInfo!.businessInfo!.minPrice ? Colors
|
||||
.transparent : Colors.black38,
|
||||
),
|
||||
child: Row(
|
||||
@@ -1764,11 +1764,11 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
},
|
||||
);
|
||||
} else {
|
||||
Coupon coupon = coupons[position - 1];
|
||||
Coupon coupon = coupons![position - 1];
|
||||
return GestureDetector(
|
||||
child: Container(
|
||||
decoration: selectedCoupon == coupon.id ? BoxDecoration(
|
||||
color: subtotal > cartInfo.businessInfo.minPrice ? Colors
|
||||
color: subtotal > cartInfo!.businessInfo!.minPrice ? Colors
|
||||
.transparent : Colors.black38,
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
@@ -1882,7 +1882,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
coupon.minAmount > 0 ?
|
||||
coupon.minAmount! > 0 ?
|
||||
S.of(context).min_order_amount_token(
|
||||
coupon.minAmount) :
|
||||
S.of(context)
|
||||
@@ -1942,7 +1942,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [],
|
||||
);
|
||||
if (cartInfo.businessInfo.quickInputs.length > 0) {
|
||||
if (cartInfo!.businessInfo!.quickInputs!.length > 0) {
|
||||
Wrap w = Wrap(
|
||||
children: [],
|
||||
);
|
||||
@@ -1956,8 +1956,8 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
),
|
||||
),
|
||||
));
|
||||
for (int i = 0; i < cartInfo.businessInfo.quickInputs.length; i++) {
|
||||
String qi = cartInfo.businessInfo.quickInputs[i].value;
|
||||
for (int i = 0; i < cartInfo!.businessInfo!.quickInputs!.length; i++) {
|
||||
String qi = cartInfo!.businessInfo!.quickInputs![i].value;
|
||||
w.children.add(TextButton(
|
||||
child: Text(
|
||||
qi,
|
||||
@@ -2137,7 +2137,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
child: Container(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
'${shippingRate.price.toStringAsFixed(2)}',
|
||||
'${shippingRate.price!.toStringAsFixed(2)}',
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
color: Colors.black38,
|
||||
@@ -2221,14 +2221,14 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
},
|
||||
businessId: widget.businessId,
|
||||
body: {
|
||||
'cart_id': cartInfo.id,
|
||||
'cart_id': cartInfo!.id,
|
||||
'remark': orderRemark,
|
||||
'booked_at': bookingTimeList.length > 0
|
||||
? bookingTimeList[bookingTimeIndex].unixTime
|
||||
: (
|
||||
(bookingTimeList.length == 0 && bookingDateTimeList.length == 0) ?
|
||||
0 :
|
||||
bookingDateTimeList[bookingDateIndex].bookTimes[bookingTimeIndex]
|
||||
bookingDateTimeList[bookingDateIndex].bookTimes![bookingTimeIndex]
|
||||
.unixTime
|
||||
),
|
||||
'delivery': deliveryMethod,
|
||||
|
||||
Reference in New Issue
Block a user