phase3: nullfix arg-bang handler (argument_type/invalid_assignment). 872 -> 621
This commit is contained in:
@@ -240,7 +240,7 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
|
||||
onPressed: () {
|
||||
Navigator.pushReplacement(context, MaterialPageRoute(
|
||||
builder: (BuildContext context) =>
|
||||
BuyService(group.id, Constants.WEB_MINISTORE_SERVICE,
|
||||
BuyService(group.id!, Constants.WEB_MINISTORE_SERVICE,
|
||||
domain: existing_web_svc['domain'],
|
||||
sid: existing_web_svc['store']['id'],
|
||||
),
|
||||
@@ -357,7 +357,7 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
|
||||
onPressed: () {
|
||||
Navigator.pushReplacement(context, MaterialPageRoute(
|
||||
builder: (BuildContext context) =>
|
||||
BuyService(group.id, Constants.WEB_MINISTORE_SERVICE,
|
||||
BuyService(group.id!, Constants.WEB_MINISTORE_SERVICE,
|
||||
domain: selectedDomain,
|
||||
sid: selectedStore['id'],
|
||||
),
|
||||
|
||||
@@ -217,7 +217,7 @@ class DesktopBlogState extends State<DesktopBlog> {
|
||||
children: <Widget>[
|
||||
Container(
|
||||
child: Text(
|
||||
blog.title,
|
||||
blog.title!,
|
||||
style: TextStyle(
|
||||
fontSize: 19.0,
|
||||
),
|
||||
@@ -226,7 +226,7 @@ class DesktopBlogState extends State<DesktopBlog> {
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
Utils.utcDatetimeStringToLocalDatetimeString(context, blog.createdAt,),
|
||||
Utils.utcDatetimeStringToLocalDatetimeString(context, blog.createdAt!,),
|
||||
style: TextStyle(
|
||||
fontSize: 13.0,
|
||||
color: Colors.grey,
|
||||
@@ -266,7 +266,7 @@ class DesktopBlogState extends State<DesktopBlog> {
|
||||
_loadingFinish = false;
|
||||
HttpUtil.httpGet(
|
||||
'v1/blogs',
|
||||
businessId: widget.businessId,
|
||||
businessId: widget.businessId!,
|
||||
queryParameters: {
|
||||
'page': _page.toString(),
|
||||
'size': Constants.BLOG_PER_PAGE_DESKTOP.toString()
|
||||
|
||||
@@ -106,7 +106,7 @@ class DesktopBuyServiceState extends State<DesktopBuyService> {
|
||||
items: plans.map((e) {
|
||||
return DropdownMenuItem<KeyValue>(
|
||||
value: e,
|
||||
child: Text(e.name),
|
||||
child: Text(e.name!),
|
||||
);
|
||||
}).toList(),
|
||||
isExpanded: true,
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
|
||||
@@ -146,7 +146,7 @@ class DesktopCouponsState extends State<DesktopCoupons> {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Text(
|
||||
coupon.description,
|
||||
coupon.description!,
|
||||
style: TextStyle(
|
||||
fontSize: 12.0,
|
||||
color: Colors.black26,
|
||||
@@ -185,7 +185,7 @@ class DesktopCouponsState extends State<DesktopCoupons> {
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
'${Utils.smartRound(coupon.valueAmount, 2)}',
|
||||
'${Utils.smartRound(coupon.valueAmount!, 2)}',
|
||||
style: TextStyle(
|
||||
fontSize: 28.0,
|
||||
color: Colors.redAccent,
|
||||
@@ -200,7 +200,7 @@ class DesktopCouponsState extends State<DesktopCoupons> {
|
||||
children: <Widget>[
|
||||
Container(
|
||||
child: Text(
|
||||
'${Utils.smartRound(coupon.valueAmount, 2)}',
|
||||
'${Utils.smartRound(coupon.valueAmount!, 2)}',
|
||||
style: TextStyle(
|
||||
fontSize: 28.0,
|
||||
color: Colors.redAccent,
|
||||
@@ -222,7 +222,7 @@ class DesktopCouponsState extends State<DesktopCoupons> {
|
||||
Container(
|
||||
child: Text(
|
||||
coupon.minAmount! > 0 ?
|
||||
S.of(context).available_for_order_over_token(coupon.minAmount) :
|
||||
S.of(context).available_for_order_over_token(coupon.minAmount!) :
|
||||
S.of(context).no_restriction,
|
||||
style: TextStyle(
|
||||
fontSize: 10.0,
|
||||
@@ -261,7 +261,7 @@ class DesktopCouponsState extends State<DesktopCoupons> {
|
||||
child: Text(
|
||||
coupon.expirationDate == null || coupon.expirationDate!.length == 0 ?
|
||||
S.of(context).no_expiration :
|
||||
S.of(context).expiration_date_token(coupon.expirationDate),
|
||||
S.of(context).expiration_date_token(coupon.expirationDate!),
|
||||
style: TextStyle(
|
||||
color: Colors.black26,
|
||||
fontSize: 15.0,
|
||||
|
||||
@@ -303,7 +303,7 @@ class DesktopLoginState extends State<DesktopLogin> {
|
||||
box.put(Constants.KEY_USER_ID, response.data['user_id']);
|
||||
box.put(Constants.KEY_ACCESS_TOKEN, response.data['access_token']);
|
||||
if (store.state.redirectRoute != null) {
|
||||
Routes.router.navigateTo(context, store.state.redirectRoute,
|
||||
Routes.router.navigateTo(context, store.state.redirectRoute!,
|
||||
replace: true);
|
||||
store.dispatch(UpdateRedirectRoute(null));
|
||||
} else {
|
||||
|
||||
@@ -125,7 +125,7 @@ class DesktopMeState extends State<DesktopMe> {
|
||||
Container(
|
||||
child: Text(
|
||||
_user != null
|
||||
? Utils.safePhoneNumber(_user.mobile)
|
||||
? Utils.safePhoneNumber(_user.mobile!)
|
||||
: '',
|
||||
style: TextStyle(
|
||||
color: Colors.black38,
|
||||
@@ -493,7 +493,7 @@ class DesktopMeState extends State<DesktopMe> {
|
||||
),
|
||||
),
|
||||
),
|
||||
onTap: tap,
|
||||
onTap: tap!,
|
||||
),
|
||||
);
|
||||
return widget;
|
||||
|
||||
@@ -147,7 +147,7 @@ class DesktopMyAddressesState extends State<DesktopMyAddresses> {
|
||||
children: <Widget>[
|
||||
Container(
|
||||
child: Text(
|
||||
address.addressLine1,
|
||||
address.addressLine1!,
|
||||
style: TextStyle(
|
||||
fontSize: 19.0,
|
||||
),
|
||||
@@ -156,7 +156,7 @@ class DesktopMyAddressesState extends State<DesktopMyAddresses> {
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
address.addressLine2,
|
||||
address.addressLine2!,
|
||||
style: TextStyle(
|
||||
fontSize: 13.0,
|
||||
color: Colors.grey,
|
||||
@@ -166,7 +166,7 @@ class DesktopMyAddressesState extends State<DesktopMyAddresses> {
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.0),
|
||||
child: Text(
|
||||
'${address.contactName} ${Utils.safePhoneNumber(address.phone)}',
|
||||
'${address.contactName} ${Utils.safePhoneNumber(address.phone!)}',
|
||||
style: TextStyle(
|
||||
fontSize: 15.0,
|
||||
color: Colors.black87,
|
||||
@@ -202,7 +202,7 @@ class DesktopMyAddressesState extends State<DesktopMyAddresses> {
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.push(context, MaterialPageRoute(
|
||||
builder: (BuildContext context) => new EditAddress(address, businessId: widget.businessId,),
|
||||
builder: (BuildContext context) => new EditAddress(address, businessId: widget.businessId!,),
|
||||
));
|
||||
},
|
||||
),
|
||||
|
||||
@@ -227,7 +227,7 @@ class DesktopMySupportState extends State<DesktopMySupport> {
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
Utils.utcDatetimeStringToLocalDatetimeString(context, ticket.createdAt, withTime: true),
|
||||
Utils.utcDatetimeStringToLocalDatetimeString(context, ticket.createdAt!, withTime: true),
|
||||
style: TextStyle(
|
||||
fontSize: 13.0,
|
||||
color: Colors.grey,
|
||||
@@ -296,7 +296,7 @@ class DesktopMySupportState extends State<DesktopMySupport> {
|
||||
void loadTicketes(bool isRefresh) {
|
||||
HttpUtil.httpGet(
|
||||
'v1/mysupport',
|
||||
businessId: widget.businessId,
|
||||
businessId: widget.businessId!,
|
||||
queryParameters: {
|
||||
'page': _page.toString(),
|
||||
'size': Constants.TICKET_PER_PAGE_DESKTOP.toString(),
|
||||
|
||||
@@ -253,7 +253,7 @@ class DesktopNewCommentState extends State<DesktopNewComment> {
|
||||
child: Text(S.of(context).yes_i_am_sure),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
_deleteImage(image.id);
|
||||
_deleteImage(image.id!);
|
||||
},
|
||||
),
|
||||
],
|
||||
@@ -305,7 +305,7 @@ class DesktopNewCommentState extends State<DesktopNewComment> {
|
||||
context: mainContext,
|
||||
barrierDismissible: true,
|
||||
builder: (BuildContext context) {
|
||||
return Util().getPicture(mainContext, store.state.user,
|
||||
return Util().getPicture(mainContext, store.state.user!,
|
||||
commentId: comment != null ? comment.id : 0,
|
||||
orderId: widget.orderId);
|
||||
}
|
||||
|
||||
@@ -505,7 +505,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
|
||||
margin: EdgeInsets.only(top: 10.0, bottom: 10.0),
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
'${Utils.timestampToString(context, order.bookedAt, withTime: true)}',
|
||||
'${Utils.timestampToString(context, order.bookedAt!, withTime: true)}',
|
||||
style: TextStyle(
|
||||
color: Colors.black38,
|
||||
),
|
||||
@@ -806,7 +806,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
|
||||
margin: EdgeInsets.only(top: 10.0, bottom: 10.0),
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
Utils.timestampToString(context, order.createdAt, withTime: true),
|
||||
Utils.timestampToString(context, order.createdAt!, withTime: true),
|
||||
style: TextStyle(
|
||||
color: Colors.black38,
|
||||
),
|
||||
@@ -862,7 +862,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
Utils.getOrderStatus(context, order.status),
|
||||
Utils.getOrderStatus(context, order.status!),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
@@ -918,7 +918,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
'${Utils.utcDatetimeStringToLocalDatetimeString(context, fulfillment.createdAt, withTime: true)}',
|
||||
'${Utils.utcDatetimeStringToLocalDatetimeString(context, fulfillment.createdAt!, withTime: true)}',
|
||||
style: TextStyle(
|
||||
fontSize: 12.0,
|
||||
color: Colors.black26,
|
||||
@@ -1053,7 +1053,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
Utils.orderAgain(context, order.cartInfo);
|
||||
Utils.orderAgain(context, order.cartInfo!);
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
@@ -193,7 +193,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
|
||||
if (order.cartInfo!.productList!.length > 1) {
|
||||
row.children.add(Container(
|
||||
child: Text(
|
||||
S.of(context).and_more_item_token(Utils.getProductLineInOrder(order.cartInfo)),
|
||||
S.of(context).and_more_item_token(Utils.getProductLineInOrder(order.cartInfo!)),
|
||||
style: TextStyle(
|
||||
fontSize: 12.0,
|
||||
color: Colors.black26,
|
||||
@@ -222,7 +222,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.push(context, MaterialPageRoute(
|
||||
builder: (BuildContext context) => OrderDetail(order.id, fromOrders: true,),
|
||||
builder: (BuildContext context) => OrderDetail(order.id!, fromOrders: true,),
|
||||
));
|
||||
},
|
||||
),
|
||||
@@ -281,7 +281,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Utils.orderAgain(context, order.cartInfo);
|
||||
Utils.orderAgain(context, order.cartInfo!);
|
||||
},
|
||||
));
|
||||
}
|
||||
@@ -298,7 +298,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Utils.orderAgain(context, order.cartInfo);
|
||||
Utils.orderAgain(context, order.cartInfo!);
|
||||
},
|
||||
));
|
||||
}
|
||||
@@ -346,7 +346,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
'#${order.orderNum} ${Utils.timestampToString(context, order.createdAt, withTime: true)}',
|
||||
'#${order.orderNum} ${Utils.timestampToString(context, order.createdAt!, withTime: true)}',
|
||||
style: TextStyle(
|
||||
fontSize: 12.0,
|
||||
color: Colors.black26,
|
||||
@@ -358,7 +358,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(
|
||||
builder: (BuildContext context) => OrderDetail(order.id, fromOrders: true,),
|
||||
builder: (BuildContext context) => OrderDetail(order.id!, fromOrders: true,),
|
||||
));
|
||||
},
|
||||
),
|
||||
@@ -369,7 +369,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
|
||||
children: <Widget>[
|
||||
Container(
|
||||
child: Text(
|
||||
'${Utils.getOrderStatus(context, order.status)}',
|
||||
'${Utils.getOrderStatus(context, order.status!)}',
|
||||
style: TextStyle(
|
||||
fontSize: 15.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -404,7 +404,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(
|
||||
builder: (BuildContext context) => OrderDetail(order.id, fromOrders: true,),
|
||||
builder: (BuildContext context) => OrderDetail(order.id!, fromOrders: true,),
|
||||
));
|
||||
},
|
||||
),
|
||||
|
||||
@@ -174,7 +174,7 @@ class DesktopPayNowState extends State<DesktopPayNow> {
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.only(right: 10.0),
|
||||
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,
|
||||
@@ -183,7 +183,7 @@ class DesktopPayNowState extends State<DesktopPayNow> {
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
S.of(context).pay_with_token(PaymentPlatform.getPaymentPlatformName(context, paymentPlatform.code)),
|
||||
S.of(context).pay_with_token(PaymentPlatform.getPaymentPlatformName(context, paymentPlatform.code!)),
|
||||
style: TextStyle(
|
||||
fontSize: 18.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
@@ -43,7 +43,7 @@ class DesktopPlainPageState extends State<DesktopPlainPage> {
|
||||
padding: EdgeInsets.only(top: 20, left: 16.0, right: 16.0, bottom: 16.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
widget.blog.title,
|
||||
widget.blog.title!,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 20,
|
||||
@@ -55,7 +55,7 @@ class DesktopPlainPageState extends State<DesktopPlainPage> {
|
||||
padding: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 20.0),
|
||||
child: MarkdownBody(
|
||||
shrinkWrap: true,
|
||||
data: widget.blog.body,
|
||||
data: widget.blog.body!,
|
||||
),
|
||||
));
|
||||
|
||||
@@ -64,7 +64,7 @@ class DesktopPlainPageState extends State<DesktopPlainPage> {
|
||||
title: S.of(context).blog,
|
||||
back: true,
|
||||
breadCrumbs: [
|
||||
BreadCrumb(widget.blog.title, null),
|
||||
BreadCrumb(widget.blog.title!, null),
|
||||
],
|
||||
breadCrumbHeight: Constants.BREADCRUMB_HEIGHT,
|
||||
),
|
||||
|
||||
@@ -83,7 +83,7 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
|
||||
title: S.of(context).shop,
|
||||
back: true,
|
||||
breadCrumbs: [
|
||||
BreadCrumb(productDetail.name, null),
|
||||
BreadCrumb(productDetail.name!, null),
|
||||
],
|
||||
breadCrumbHeight: Constants.BREADCRUMB_HEIGHT,
|
||||
// shoppingCart: DesktopShoppingCartWidget(business: widget.business,),
|
||||
@@ -125,7 +125,7 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
productDetail.name,
|
||||
productDetail.name!,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
style: TextStyle(
|
||||
@@ -163,7 +163,7 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ShowPrice(
|
||||
productDetail.price,
|
||||
productDetail.price!,
|
||||
currencySign: '\$',
|
||||
fontWeight: FontWeight.bold,
|
||||
smallFontSize: 24,
|
||||
@@ -208,13 +208,13 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
(productDetail.subproducts!.length > 0) ?
|
||||
subProducts(productDetail.subproducts) :
|
||||
subProducts(productDetail.subproducts!) :
|
||||
SizedBox.shrink(),
|
||||
Container(
|
||||
padding: EdgeInsets.only(
|
||||
top: 10.0, left: 10.0, right: 10.0, bottom: 16.0),
|
||||
child: Text(
|
||||
productDetail.description,
|
||||
productDetail.description!,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0, color: Colors.black54),
|
||||
),
|
||||
@@ -253,7 +253,7 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
|
||||
children: <Widget>[
|
||||
Container(
|
||||
child: Text(
|
||||
S.of(context).weight_token(productDetail.weight),
|
||||
S.of(context).weight_token(productDetail.weight!),
|
||||
style: TextStyle(
|
||||
fontSize: 12.0,
|
||||
color: Colors.black54,
|
||||
@@ -263,9 +263,9 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
|
||||
Container(
|
||||
child: Text(
|
||||
S.of(context).dimentions_token(
|
||||
productDetail.dimentionsLength,
|
||||
productDetail.dimentionsWidth,
|
||||
productDetail.dimentionsHeight),
|
||||
productDetail.dimentionsLength!,
|
||||
productDetail.dimentionsWidth!,
|
||||
productDetail.dimentionsHeight!),
|
||||
style: TextStyle(
|
||||
fontSize: 12.0,
|
||||
color: Colors.black54,
|
||||
@@ -301,7 +301,7 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
|
||||
Widget getImage(double width) {
|
||||
if (productDetail.images!.length <= 0) {
|
||||
return Util.showImage(
|
||||
productDetail.image,
|
||||
productDetail.image!,
|
||||
width: width,
|
||||
height: width,
|
||||
);
|
||||
@@ -427,7 +427,7 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
|
||||
_tabController = TabController(vsync: this, length: 2);
|
||||
HttpUtil.httpGet(
|
||||
'v1/product-detail/${widget.product.id}',
|
||||
businessId: widget.business.id,
|
||||
businessId: widget.business.id!,
|
||||
).then((value) {
|
||||
print(value);
|
||||
productDetail = ProductDetail.fromJson(value);
|
||||
@@ -452,7 +452,7 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
|
||||
List<Widget> _getProductPictures(BuildContext context) {
|
||||
var pages = <Widget>[];
|
||||
List<String> images = [];
|
||||
images.add(productDetail.image);
|
||||
images.add(productDetail.image!);
|
||||
for (var i = 0; i < productDetail.images!.length; i++) {
|
||||
// print('>>https:' + productDetail.images[i].image);
|
||||
images.add(productDetail.images![i].image);
|
||||
|
||||
@@ -72,8 +72,8 @@ class DesktopSearchPlaceState extends State<DesktopSearchPlace> {
|
||||
onSearch: search,
|
||||
onItemFound: (LocatedAddress locatedAddress, int index) {
|
||||
return ListTile(
|
||||
title: Text(locatedAddress.streetName),
|
||||
subtitle: Text(locatedAddress.formattedAddress),
|
||||
title: Text(locatedAddress.streetName!),
|
||||
subtitle: Text(locatedAddress.formattedAddress!),
|
||||
onTap: () {
|
||||
if (widget.businessId == 0) {
|
||||
_selectPlace(locatedAddress);
|
||||
@@ -130,7 +130,7 @@ class DesktopSearchPlaceState extends State<DesktopSearchPlace> {
|
||||
if (result.response != null) {
|
||||
throw RuntimeError(result.response!.data['message']);
|
||||
} else {
|
||||
throw RuntimeError(result.message);
|
||||
throw RuntimeError(result.message!);
|
||||
}
|
||||
} else if (result != null && result is List) {
|
||||
return result.map((e) => LocatedAddress.fromJson(e)).toList();
|
||||
|
||||
@@ -59,7 +59,7 @@ class DesktopShoppingCartWidgetState extends State<DesktopShoppingCartWidget> {
|
||||
child: row,
|
||||
width: 160.0,
|
||||
),
|
||||
onTap: widget.onTap,
|
||||
onTap: widget.onTap!,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ class DesktopStoreProductSearchState extends State<DesktopStoreProductSearch> {
|
||||
if (result.response != null) {
|
||||
throw RuntimeError(result.response!.data);
|
||||
} else {
|
||||
throw RuntimeError(result.message);
|
||||
throw RuntimeError(result.message!);
|
||||
}
|
||||
} else if (result != null && result is List) {
|
||||
lastBottomPosition = 0;
|
||||
|
||||
@@ -153,7 +153,7 @@ class DesktopUserProfileState extends State<DesktopUserProfile> {
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
_user.nickname,
|
||||
_user.nickname!,
|
||||
style: TextStyle(
|
||||
color: Colors.grey
|
||||
),
|
||||
@@ -253,7 +253,7 @@ class DesktopUserProfileState extends State<DesktopUserProfile> {
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
_user.mobile != null && _user.mobile!.isNotEmpty ? Utils.safePhoneNumber(_user.mobile) : S.of(context).not_binding,
|
||||
_user.mobile != null && _user.mobile!.isNotEmpty ? Utils.safePhoneNumber(_user.mobile!) : S.of(context).not_binding,
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
),
|
||||
@@ -306,7 +306,7 @@ class DesktopUserProfileState extends State<DesktopUserProfile> {
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
_user.email != null && _user.email!.isNotEmpty ? Utils.safePhoneNumber(_user.email) : S.of(context).not_binding,
|
||||
_user.email != null && _user.email!.isNotEmpty ? Utils.safePhoneNumber(_user.email!) : S.of(context).not_binding,
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
),
|
||||
|
||||
@@ -105,7 +105,7 @@ class DesktopViewBlogState extends State<DesktopViewBlog> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
Utils.utcDatetimeStringToLocalDatetimeString(context, blog.createdAt),
|
||||
Utils.utcDatetimeStringToLocalDatetimeString(context, blog.createdAt!),
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.black38,
|
||||
|
||||
@@ -220,14 +220,14 @@ class DesktopViewTicketState extends State<DesktopViewTicket> {
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
S.of(context).ticket_number_token(ticket.id),
|
||||
S.of(context).ticket_number_token(ticket.id!),
|
||||
style: TextStyle(
|
||||
fontSize: 24.0,
|
||||
color: Colors.black
|
||||
),
|
||||
),
|
||||
Text(
|
||||
Utils.utcDatetimeStringToLocalDatetimeString(context, ticket.createdAt),
|
||||
Utils.utcDatetimeStringToLocalDatetimeString(context, ticket.createdAt!),
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.black38,
|
||||
@@ -331,7 +331,7 @@ class DesktopViewTicketState extends State<DesktopViewTicket> {
|
||||
Text(
|
||||
Utils.utcDatetimeStringToLocalDatetimeString(
|
||||
context,
|
||||
followUp.createdAt
|
||||
followUp.createdAt!
|
||||
),
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
@@ -364,7 +364,7 @@ class DesktopViewTicketState extends State<DesktopViewTicket> {
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: showGalleryImages(
|
||||
mainContext, followUp.files,
|
||||
mainContext, followUp.files!,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -125,7 +125,7 @@ class ProductItemState extends State<ProductItem> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
widget.product.description,
|
||||
widget.product.description!,
|
||||
// overflow: kIsWeb ? null : TextOverflow.ellipsis,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
@@ -150,7 +150,7 @@ class ProductItemState extends State<ProductItem> {
|
||||
) : SizedBox.shrink(),
|
||||
),
|
||||
ShowPrice(
|
||||
widget.product.price,
|
||||
widget.product.price!,
|
||||
regularPrice: widget.product.regularPrice,
|
||||
currencySign: '\$',
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -212,7 +212,7 @@ class ProductItemState extends State<ProductItem> {
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
widget.product.description,
|
||||
widget.product.description!,
|
||||
// overflow: kIsWeb ? null : TextOverflow.ellipsis,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
@@ -238,7 +238,7 @@ class ProductItemState extends State<ProductItem> {
|
||||
) : SizedBox.shrink(),
|
||||
),
|
||||
ShowPrice(
|
||||
widget.product.price,
|
||||
widget.product.price!,
|
||||
regularPrice: widget.product.regularPrice,
|
||||
currencySign: '\$',
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
@@ -144,7 +144,7 @@ class ProductSearchState extends State<ProductSearch> {
|
||||
if (result.response != null) {
|
||||
throw RuntimeError(result.response!.data);
|
||||
} else {
|
||||
throw RuntimeError(result.message);
|
||||
throw RuntimeError(result.message!);
|
||||
}
|
||||
} else if (result != null && result is List) {
|
||||
lastBottomPosition = 0;
|
||||
|
||||
@@ -206,7 +206,7 @@ class ShopState extends State<Shop> {
|
||||
}
|
||||
_productCurrentPage = 1;
|
||||
Utils.loadProducts(
|
||||
widget.businessId, categoryId, _productCurrentPage, false,
|
||||
widget.businessId!, categoryId, _productCurrentPage, false,
|
||||
(value) {
|
||||
if (_isLoading) {
|
||||
_isLoading = false;
|
||||
@@ -251,7 +251,7 @@ class ShopState extends State<Shop> {
|
||||
return;
|
||||
}
|
||||
_productCurrentPage += 1;
|
||||
Utils.loadProducts(widget.businessId, categoryId, _productCurrentPage, true, (value) {
|
||||
Utils.loadProducts(widget.businessId!, categoryId, _productCurrentPage, true, (value) {
|
||||
if (_isLoading) {
|
||||
_isLoading = false;
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -50,7 +50,7 @@ class ShopBulletinState extends State<ShopBulletin> {
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.orangeAccent,
|
||||
border: Border.all(
|
||||
color: Colors.red[500],
|
||||
color: Colors.red[500]!,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.all(Radius.circular(16)),
|
||||
|
||||
@@ -135,7 +135,7 @@ class ShopProductsState extends State<ShopProducts> {
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 5.0, bottom: 5.0),
|
||||
child: Text(
|
||||
cp.name,
|
||||
cp.name!,
|
||||
style: TextStyle(
|
||||
fontSize: 13.0,
|
||||
fontWeight: (cp.id == Constants.FEATURED_PRODUCT_ID ||
|
||||
@@ -182,7 +182,7 @@ class ShopProductsState extends State<ShopProducts> {
|
||||
new BorderSide(color: new Color(0xFFEBEBEB)))),
|
||||
child: categoryRow,
|
||||
),
|
||||
onTap: () => _selectCategory(cp.id),
|
||||
onTap: () => _selectCategory(cp.id!),
|
||||
);
|
||||
}
|
||||
),
|
||||
@@ -207,7 +207,7 @@ class ShopProductsState extends State<ShopProducts> {
|
||||
CategoryProducts cp = _categoryProducts[i];
|
||||
if (cp.products!.length > 0) {
|
||||
col.children.add(new Container(
|
||||
height: _categoryDescHeight,
|
||||
height: _categoryDescHeight!,
|
||||
padding: new EdgeInsets.symmetric(horizontal: 10.0),
|
||||
color: new Color(0xFFF5F5F5),
|
||||
child: new Row(
|
||||
@@ -221,7 +221,7 @@ class ShopProductsState extends State<ShopProducts> {
|
||||
new Padding(
|
||||
padding: new EdgeInsets.only(right: 5.0),
|
||||
child: new Text(
|
||||
cp.name,
|
||||
cp.name!,
|
||||
style: new TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight:
|
||||
@@ -241,7 +241,7 @@ class ShopProductsState extends State<ShopProducts> {
|
||||
new Visibility(
|
||||
visible: cp.description!.isNotEmpty,
|
||||
child: new Text(
|
||||
cp.description,
|
||||
cp.description!,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: new TextStyle(
|
||||
fontSize: 10.0,
|
||||
@@ -388,7 +388,7 @@ class ShopProductsState extends State<ShopProducts> {
|
||||
CategoryProducts currentCp =
|
||||
getCategoryProductByCategoryId(categoryId);
|
||||
if (currentCp != null) {
|
||||
currentCp.products!.addAll(moreCategoryProducts[0].products);
|
||||
currentCp.products!.addAll(moreCategoryProducts[0].products!);
|
||||
} else {
|
||||
displayProductByCategoryClickIndicator = S
|
||||
.of(context)
|
||||
|
||||
@@ -60,7 +60,7 @@ class ShoppingCartWidgetState extends State<ShoppingCartWidget> {
|
||||
child: row,
|
||||
width: 160.0,
|
||||
),
|
||||
onTap: widget.onTap,
|
||||
onTap: widget.onTap!,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user