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

@@ -17,9 +17,9 @@ class AttributeSelection extends StatelessWidget {
return ResponsiveBuilder( return ResponsiveBuilder(
builder: (context, sizingInformation) => builder: (context, sizingInformation) =>
ScreenTypeLayout( ScreenTypeLayout(
mobile: MobileAttributeSelection(product: product, business: business, startKey: startKey,), mobile: MobileAttributeSelection(product: product!, business: business!, startKey: startKey,),
tablet: MobileAttributeSelection(product: product, business: business, startKey: startKey,), tablet: MobileAttributeSelection(product: product!, business: business!, startKey: startKey,),
desktop: MobileAttributeSelection(product: product, business: business, startKey: startKey,), desktop: MobileAttributeSelection(product: product!, business: business!, startKey: startKey,),
), ),
); );
} }

View File

@@ -59,7 +59,7 @@ class ContactUsState extends State<ContactUs> {
void loadData() { void loadData() {
HttpUtil.httpGet( HttpUtil.httpGet(
'v1/get-business', 'v1/get-business',
businessId: widget.businessId, businessId: widget.businessId!,
).then((value) { ).then((value) {
business = Business.fromJson(value); business = Business.fromJson(value);
setState(() {}); setState(() {});

View File

@@ -60,7 +60,7 @@ class PlainPageState extends State<PlainPage> {
void loadData() { void loadData() {
HttpUtil.httpGet( HttpUtil.httpGet(
'v1/special-page', 'v1/special-page',
businessId: widget.businessId, businessId: widget.businessId!,
queryParameters: { queryParameters: {
'bid': widget.slug, 'bid': widget.slug,
} }

View File

@@ -24,9 +24,9 @@ class ProductDetailPage extends StatelessWidget {
return ResponsiveBuilder( return ResponsiveBuilder(
builder: (context, sizingInformation) => builder: (context, sizingInformation) =>
ScreenTypeLayout( ScreenTypeLayout(
mobile: MobileProductDetailPage(business: business, product: product,), mobile: MobileProductDetailPage(business: business!, product: product!,),
tablet: DesktopProductDetailPage(business: business, product: product,), tablet: DesktopProductDetailPage(business: business!, product: product!,),
desktop: DesktopProductDetailPage(business: business, product: product,), desktop: DesktopProductDetailPage(business: business!, product: product!,),
), ),
); );
} }

View File

@@ -77,7 +77,7 @@ class Util {
Future onSelectNotification(String payload, {bool replace=false}) async { Future onSelectNotification(String payload, {bool replace=false}) async {
print('payload: $payload'); print('payload: $payload');
if (payload != null && payload.isNotEmpty) { if (payload != null && payload.isNotEmpty) {
Routes.router.navigateTo(store.state.context, payload, replace: replace); Routes.router.navigateTo(store.state.context!, payload, replace: replace);
} }
} }
@@ -132,7 +132,7 @@ class Util {
Future onDidReceiveLocalNotification(int id, String title, String body, String payload) async { Future onDidReceiveLocalNotification(int id, String title, String body, String payload) async {
showDialog( showDialog(
context: store.state.context, context: store.state.context!,
builder: (BuildContext context) => CupertinoAlertDialog( builder: (BuildContext context) => CupertinoAlertDialog(
title: Text(title), title: Text(title),
content: Text(body), content: Text(body),
@@ -207,7 +207,7 @@ class Util {
width: width, width: width,
height: width, height: width,
fit: fit, fit: fit,
placeholder: (context, url) => Utils.imageLoadingIndicator(width: width, height: height), placeholder: (context, url) => Utils.imageLoadingIndicator(width: width!, height: height!),
errorWidget: errorWidget != null ? errorWidget : (context, url, error) { errorWidget: errorWidget != null ? errorWidget : (context, url, error) {
return Image.asset( return Image.asset(
'assets/images/not_found.png', 'assets/images/not_found.png',

View File

@@ -240,7 +240,7 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
onPressed: () { onPressed: () {
Navigator.pushReplacement(context, MaterialPageRoute( Navigator.pushReplacement(context, MaterialPageRoute(
builder: (BuildContext context) => builder: (BuildContext context) =>
BuyService(group.id, Constants.WEB_MINISTORE_SERVICE, BuyService(group.id!, Constants.WEB_MINISTORE_SERVICE,
domain: existing_web_svc['domain'], domain: existing_web_svc['domain'],
sid: existing_web_svc['store']['id'], sid: existing_web_svc['store']['id'],
), ),
@@ -357,7 +357,7 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
onPressed: () { onPressed: () {
Navigator.pushReplacement(context, MaterialPageRoute( Navigator.pushReplacement(context, MaterialPageRoute(
builder: (BuildContext context) => builder: (BuildContext context) =>
BuyService(group.id, Constants.WEB_MINISTORE_SERVICE, BuyService(group.id!, Constants.WEB_MINISTORE_SERVICE,
domain: selectedDomain, domain: selectedDomain,
sid: selectedStore['id'], sid: selectedStore['id'],
), ),

View File

@@ -217,7 +217,7 @@ class DesktopBlogState extends State<DesktopBlog> {
children: <Widget>[ children: <Widget>[
Container( Container(
child: Text( child: Text(
blog.title, blog.title!,
style: TextStyle( style: TextStyle(
fontSize: 19.0, fontSize: 19.0,
), ),
@@ -226,7 +226,7 @@ class DesktopBlogState extends State<DesktopBlog> {
), ),
Container( Container(
child: Text( child: Text(
Utils.utcDatetimeStringToLocalDatetimeString(context, blog.createdAt,), Utils.utcDatetimeStringToLocalDatetimeString(context, blog.createdAt!,),
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
color: Colors.grey, color: Colors.grey,
@@ -266,7 +266,7 @@ class DesktopBlogState extends State<DesktopBlog> {
_loadingFinish = false; _loadingFinish = false;
HttpUtil.httpGet( HttpUtil.httpGet(
'v1/blogs', 'v1/blogs',
businessId: widget.businessId, businessId: widget.businessId!,
queryParameters: { queryParameters: {
'page': _page.toString(), 'page': _page.toString(),
'size': Constants.BLOG_PER_PAGE_DESKTOP.toString() 'size': Constants.BLOG_PER_PAGE_DESKTOP.toString()

View File

@@ -106,7 +106,7 @@ class DesktopBuyServiceState extends State<DesktopBuyService> {
items: plans.map((e) { items: plans.map((e) {
return DropdownMenuItem<KeyValue>( return DropdownMenuItem<KeyValue>(
value: e, value: e,
child: Text(e.name), child: Text(e.name!),
); );
}).toList(), }).toList(),
isExpanded: true, isExpanded: true,

View File

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

View File

@@ -146,7 +146,7 @@ class DesktopCouponsState extends State<DesktopCoupons> {
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
Text( Text(
coupon.description, coupon.description!,
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.black26, color: Colors.black26,
@@ -185,7 +185,7 @@ class DesktopCouponsState extends State<DesktopCoupons> {
), ),
Container( Container(
child: Text( child: Text(
'${Utils.smartRound(coupon.valueAmount, 2)}', '${Utils.smartRound(coupon.valueAmount!, 2)}',
style: TextStyle( style: TextStyle(
fontSize: 28.0, fontSize: 28.0,
color: Colors.redAccent, color: Colors.redAccent,
@@ -200,7 +200,7 @@ class DesktopCouponsState extends State<DesktopCoupons> {
children: <Widget>[ children: <Widget>[
Container( Container(
child: Text( child: Text(
'${Utils.smartRound(coupon.valueAmount, 2)}', '${Utils.smartRound(coupon.valueAmount!, 2)}',
style: TextStyle( style: TextStyle(
fontSize: 28.0, fontSize: 28.0,
color: Colors.redAccent, color: Colors.redAccent,
@@ -222,7 +222,7 @@ class DesktopCouponsState extends State<DesktopCoupons> {
Container( Container(
child: Text( child: Text(
coupon.minAmount! > 0 ? 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, S.of(context).no_restriction,
style: TextStyle( style: TextStyle(
fontSize: 10.0, fontSize: 10.0,
@@ -261,7 +261,7 @@ class DesktopCouponsState extends State<DesktopCoupons> {
child: Text( child: Text(
coupon.expirationDate == null || coupon.expirationDate!.length == 0 ? coupon.expirationDate == null || coupon.expirationDate!.length == 0 ?
S.of(context).no_expiration : S.of(context).no_expiration :
S.of(context).expiration_date_token(coupon.expirationDate), S.of(context).expiration_date_token(coupon.expirationDate!),
style: TextStyle( style: TextStyle(
color: Colors.black26, color: Colors.black26,
fontSize: 15.0, fontSize: 15.0,

View File

@@ -303,7 +303,7 @@ class DesktopLoginState extends State<DesktopLogin> {
box.put(Constants.KEY_USER_ID, response.data['user_id']); box.put(Constants.KEY_USER_ID, response.data['user_id']);
box.put(Constants.KEY_ACCESS_TOKEN, response.data['access_token']); box.put(Constants.KEY_ACCESS_TOKEN, response.data['access_token']);
if (store.state.redirectRoute != null) { if (store.state.redirectRoute != null) {
Routes.router.navigateTo(context, store.state.redirectRoute, Routes.router.navigateTo(context, store.state.redirectRoute!,
replace: true); replace: true);
store.dispatch(UpdateRedirectRoute(null)); store.dispatch(UpdateRedirectRoute(null));
} else { } else {

View File

@@ -125,7 +125,7 @@ class DesktopMeState extends State<DesktopMe> {
Container( Container(
child: Text( child: Text(
_user != null _user != null
? Utils.safePhoneNumber(_user.mobile) ? Utils.safePhoneNumber(_user.mobile!)
: '', : '',
style: TextStyle( style: TextStyle(
color: Colors.black38, color: Colors.black38,
@@ -493,7 +493,7 @@ class DesktopMeState extends State<DesktopMe> {
), ),
), ),
), ),
onTap: tap, onTap: tap!,
), ),
); );
return widget; return widget;

View File

@@ -147,7 +147,7 @@ class DesktopMyAddressesState extends State<DesktopMyAddresses> {
children: <Widget>[ children: <Widget>[
Container( Container(
child: Text( child: Text(
address.addressLine1, address.addressLine1!,
style: TextStyle( style: TextStyle(
fontSize: 19.0, fontSize: 19.0,
), ),
@@ -156,7 +156,7 @@ class DesktopMyAddressesState extends State<DesktopMyAddresses> {
), ),
Container( Container(
child: Text( child: Text(
address.addressLine2, address.addressLine2!,
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
color: Colors.grey, color: Colors.grey,
@@ -166,7 +166,7 @@ class DesktopMyAddressesState extends State<DesktopMyAddresses> {
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text( child: Text(
'${address.contactName} ${Utils.safePhoneNumber(address.phone)}', '${address.contactName} ${Utils.safePhoneNumber(address.phone!)}',
style: TextStyle( style: TextStyle(
fontSize: 15.0, fontSize: 15.0,
color: Colors.black87, color: Colors.black87,
@@ -202,7 +202,7 @@ class DesktopMyAddressesState extends State<DesktopMyAddresses> {
), ),
onPressed: () { onPressed: () {
Navigator.push(context, MaterialPageRoute( Navigator.push(context, MaterialPageRoute(
builder: (BuildContext context) => new EditAddress(address, businessId: widget.businessId,), builder: (BuildContext context) => new EditAddress(address, businessId: widget.businessId!,),
)); ));
}, },
), ),

View File

@@ -227,7 +227,7 @@ class DesktopMySupportState extends State<DesktopMySupport> {
), ),
Container( Container(
child: Text( child: Text(
Utils.utcDatetimeStringToLocalDatetimeString(context, ticket.createdAt, withTime: true), Utils.utcDatetimeStringToLocalDatetimeString(context, ticket.createdAt!, withTime: true),
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
color: Colors.grey, color: Colors.grey,
@@ -296,7 +296,7 @@ class DesktopMySupportState extends State<DesktopMySupport> {
void loadTicketes(bool isRefresh) { void loadTicketes(bool isRefresh) {
HttpUtil.httpGet( HttpUtil.httpGet(
'v1/mysupport', 'v1/mysupport',
businessId: widget.businessId, businessId: widget.businessId!,
queryParameters: { queryParameters: {
'page': _page.toString(), 'page': _page.toString(),
'size': Constants.TICKET_PER_PAGE_DESKTOP.toString(), 'size': Constants.TICKET_PER_PAGE_DESKTOP.toString(),

View File

@@ -253,7 +253,7 @@ class DesktopNewCommentState extends State<DesktopNewComment> {
child: Text(S.of(context).yes_i_am_sure), child: Text(S.of(context).yes_i_am_sure),
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
_deleteImage(image.id); _deleteImage(image.id!);
}, },
), ),
], ],
@@ -305,7 +305,7 @@ class DesktopNewCommentState extends State<DesktopNewComment> {
context: mainContext, context: mainContext,
barrierDismissible: true, barrierDismissible: true,
builder: (BuildContext context) { builder: (BuildContext context) {
return Util().getPicture(mainContext, store.state.user, return Util().getPicture(mainContext, store.state.user!,
commentId: comment != null ? comment.id : 0, commentId: comment != null ? comment.id : 0,
orderId: widget.orderId); orderId: widget.orderId);
} }

View File

@@ -505,7 +505,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
margin: EdgeInsets.only(top: 10.0, bottom: 10.0), margin: EdgeInsets.only(top: 10.0, bottom: 10.0),
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: Text( child: Text(
'${Utils.timestampToString(context, order.bookedAt, withTime: true)}', '${Utils.timestampToString(context, order.bookedAt!, withTime: true)}',
style: TextStyle( style: TextStyle(
color: Colors.black38, color: Colors.black38,
), ),
@@ -806,7 +806,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
margin: EdgeInsets.only(top: 10.0, bottom: 10.0), margin: EdgeInsets.only(top: 10.0, bottom: 10.0),
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: Text( child: Text(
Utils.timestampToString(context, order.createdAt, withTime: true), Utils.timestampToString(context, order.createdAt!, withTime: true),
style: TextStyle( style: TextStyle(
color: Colors.black38, color: Colors.black38,
), ),
@@ -862,7 +862,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
), ),
), ),
Text( Text(
Utils.getOrderStatus(context, order.status), Utils.getOrderStatus(context, order.status!),
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
@@ -918,7 +918,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
), ),
Container( Container(
child: Text( child: Text(
'${Utils.utcDatetimeStringToLocalDatetimeString(context, fulfillment.createdAt, withTime: true)}', '${Utils.utcDatetimeStringToLocalDatetimeString(context, fulfillment.createdAt!, withTime: true)}',
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.black26, color: Colors.black26,
@@ -1053,7 +1053,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
), ),
), ),
onPressed: () { onPressed: () {
Utils.orderAgain(context, order.cartInfo); Utils.orderAgain(context, order.cartInfo!);
}, },
), ),
), ),

View File

@@ -193,7 +193,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
if (order.cartInfo!.productList!.length > 1) { if (order.cartInfo!.productList!.length > 1) {
row.children.add(Container( row.children.add(Container(
child: Text( 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( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.black26, color: Colors.black26,
@@ -222,7 +222,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
), ),
onPressed: () { onPressed: () {
Navigator.push(context, MaterialPageRoute( 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, backgroundColor: Theme.of(context).primaryColor,
), ),
onPressed: () { 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, backgroundColor: Theme.of(context).primaryColor,
), ),
onPressed: () { onPressed: () {
Utils.orderAgain(context, order.cartInfo); Utils.orderAgain(context, order.cartInfo!);
}, },
)); ));
} }
@@ -346,7 +346,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
), ),
Container( Container(
child: Text( child: Text(
'#${order.orderNum} ${Utils.timestampToString(context, order.createdAt, withTime: true)}', '#${order.orderNum} ${Utils.timestampToString(context, order.createdAt!, withTime: true)}',
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.black26, color: Colors.black26,
@@ -358,7 +358,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
), ),
onTap: () { onTap: () {
Navigator.push(context, MaterialPageRoute( 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>[ children: <Widget>[
Container( Container(
child: Text( child: Text(
'${Utils.getOrderStatus(context, order.status)}', '${Utils.getOrderStatus(context, order.status!)}',
style: TextStyle( style: TextStyle(
fontSize: 15.0, fontSize: 15.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@@ -404,7 +404,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
), ),
onTap: () { onTap: () {
Navigator.push(context, MaterialPageRoute( Navigator.push(context, MaterialPageRoute(
builder: (BuildContext context) => OrderDetail(order.id, fromOrders: true,), builder: (BuildContext context) => OrderDetail(order.id!, fromOrders: true,),
)); ));
}, },
), ),

View File

@@ -174,7 +174,7 @@ class DesktopPayNowState extends State<DesktopPayNow> {
children: <Widget>[ children: <Widget>[
Container( Container(
padding: EdgeInsets.only(right: 10.0), 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,), errorWidget: (context, url, error) => Icon(Icons.broken_image, size: 50.0, color: Colors.transparent,),
fit: BoxFit.cover, fit: BoxFit.cover,
width: 50.0, width: 50.0,
@@ -183,7 +183,7 @@ class DesktopPayNowState extends State<DesktopPayNow> {
), ),
Expanded( Expanded(
child: Text( 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( style: TextStyle(
fontSize: 18.0, fontSize: 18.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,

View File

@@ -43,7 +43,7 @@ class DesktopPlainPageState extends State<DesktopPlainPage> {
padding: EdgeInsets.only(top: 20, left: 16.0, right: 16.0, bottom: 16.0), padding: EdgeInsets.only(top: 20, left: 16.0, right: 16.0, bottom: 16.0),
child: Center( child: Center(
child: Text( child: Text(
widget.blog.title, widget.blog.title!,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 20, fontSize: 20,
@@ -55,7 +55,7 @@ class DesktopPlainPageState extends State<DesktopPlainPage> {
padding: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 20.0), padding: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 20.0),
child: MarkdownBody( child: MarkdownBody(
shrinkWrap: true, shrinkWrap: true,
data: widget.blog.body, data: widget.blog.body!,
), ),
)); ));
@@ -64,7 +64,7 @@ class DesktopPlainPageState extends State<DesktopPlainPage> {
title: S.of(context).blog, title: S.of(context).blog,
back: true, back: true,
breadCrumbs: [ breadCrumbs: [
BreadCrumb(widget.blog.title, null), BreadCrumb(widget.blog.title!, null),
], ],
breadCrumbHeight: Constants.BREADCRUMB_HEIGHT, breadCrumbHeight: Constants.BREADCRUMB_HEIGHT,
), ),

View File

@@ -83,7 +83,7 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
title: S.of(context).shop, title: S.of(context).shop,
back: true, back: true,
breadCrumbs: [ breadCrumbs: [
BreadCrumb(productDetail.name, null), BreadCrumb(productDetail.name!, null),
], ],
breadCrumbHeight: Constants.BREADCRUMB_HEIGHT, breadCrumbHeight: Constants.BREADCRUMB_HEIGHT,
// shoppingCart: DesktopShoppingCartWidget(business: widget.business,), // shoppingCart: DesktopShoppingCartWidget(business: widget.business,),
@@ -125,7 +125,7 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
), ),
Container( Container(
child: Text( child: Text(
productDetail.name, productDetail.name!,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 2, maxLines: 2,
style: TextStyle( style: TextStyle(
@@ -163,7 +163,7 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
ShowPrice( ShowPrice(
productDetail.price, productDetail.price!,
currencySign: '\$', currencySign: '\$',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
smallFontSize: 24, smallFontSize: 24,
@@ -208,13 +208,13 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
(productDetail.subproducts!.length > 0) ? (productDetail.subproducts!.length > 0) ?
subProducts(productDetail.subproducts) : subProducts(productDetail.subproducts!) :
SizedBox.shrink(), SizedBox.shrink(),
Container( Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 10.0, left: 10.0, right: 10.0, bottom: 16.0), top: 10.0, left: 10.0, right: 10.0, bottom: 16.0),
child: Text( child: Text(
productDetail.description, productDetail.description!,
style: TextStyle( style: TextStyle(
fontSize: 14.0, color: Colors.black54), fontSize: 14.0, color: Colors.black54),
), ),
@@ -253,7 +253,7 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
children: <Widget>[ children: <Widget>[
Container( Container(
child: Text( child: Text(
S.of(context).weight_token(productDetail.weight), S.of(context).weight_token(productDetail.weight!),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.black54, color: Colors.black54,
@@ -263,9 +263,9 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
Container( Container(
child: Text( child: Text(
S.of(context).dimentions_token( S.of(context).dimentions_token(
productDetail.dimentionsLength, productDetail.dimentionsLength!,
productDetail.dimentionsWidth, productDetail.dimentionsWidth!,
productDetail.dimentionsHeight), productDetail.dimentionsHeight!),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.black54, color: Colors.black54,
@@ -301,7 +301,7 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
Widget getImage(double width) { Widget getImage(double width) {
if (productDetail.images!.length <= 0) { if (productDetail.images!.length <= 0) {
return Util.showImage( return Util.showImage(
productDetail.image, productDetail.image!,
width: width, width: width,
height: width, height: width,
); );
@@ -427,7 +427,7 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
_tabController = TabController(vsync: this, length: 2); _tabController = TabController(vsync: this, length: 2);
HttpUtil.httpGet( HttpUtil.httpGet(
'v1/product-detail/${widget.product.id}', 'v1/product-detail/${widget.product.id}',
businessId: widget.business.id, businessId: widget.business.id!,
).then((value) { ).then((value) {
print(value); print(value);
productDetail = ProductDetail.fromJson(value); productDetail = ProductDetail.fromJson(value);
@@ -452,7 +452,7 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
List<Widget> _getProductPictures(BuildContext context) { List<Widget> _getProductPictures(BuildContext context) {
var pages = <Widget>[]; var pages = <Widget>[];
List<String> images = []; List<String> images = [];
images.add(productDetail.image); images.add(productDetail.image!);
for (var i = 0; i < productDetail.images!.length; i++) { for (var i = 0; i < productDetail.images!.length; i++) {
// print('>>https:' + productDetail.images[i].image); // print('>>https:' + productDetail.images[i].image);
images.add(productDetail.images![i].image); images.add(productDetail.images![i].image);

View File

@@ -72,8 +72,8 @@ class DesktopSearchPlaceState extends State<DesktopSearchPlace> {
onSearch: search, onSearch: search,
onItemFound: (LocatedAddress locatedAddress, int index) { onItemFound: (LocatedAddress locatedAddress, int index) {
return ListTile( return ListTile(
title: Text(locatedAddress.streetName), title: Text(locatedAddress.streetName!),
subtitle: Text(locatedAddress.formattedAddress), subtitle: Text(locatedAddress.formattedAddress!),
onTap: () { onTap: () {
if (widget.businessId == 0) { if (widget.businessId == 0) {
_selectPlace(locatedAddress); _selectPlace(locatedAddress);
@@ -130,7 +130,7 @@ class DesktopSearchPlaceState extends State<DesktopSearchPlace> {
if (result.response != null) { if (result.response != null) {
throw RuntimeError(result.response!.data['message']); throw RuntimeError(result.response!.data['message']);
} else { } else {
throw RuntimeError(result.message); throw RuntimeError(result.message!);
} }
} else if (result != null && result is List) { } else if (result != null && result is List) {
return result.map((e) => LocatedAddress.fromJson(e)).toList(); return result.map((e) => LocatedAddress.fromJson(e)).toList();

View File

@@ -59,7 +59,7 @@ class DesktopShoppingCartWidgetState extends State<DesktopShoppingCartWidget> {
child: row, child: row,
width: 160.0, width: 160.0,
), ),
onTap: widget.onTap, onTap: widget.onTap!,
), ),
); );
} }

View File

@@ -136,7 +136,7 @@ class DesktopStoreProductSearchState extends State<DesktopStoreProductSearch> {
if (result.response != null) { if (result.response != null) {
throw RuntimeError(result.response!.data); throw RuntimeError(result.response!.data);
} else { } else {
throw RuntimeError(result.message); throw RuntimeError(result.message!);
} }
} else if (result != null && result is List) { } else if (result != null && result is List) {
lastBottomPosition = 0; lastBottomPosition = 0;

View File

@@ -153,7 +153,7 @@ class DesktopUserProfileState extends State<DesktopUserProfile> {
), ),
Container( Container(
child: Text( child: Text(
_user.nickname, _user.nickname!,
style: TextStyle( style: TextStyle(
color: Colors.grey color: Colors.grey
), ),
@@ -253,7 +253,7 @@ class DesktopUserProfileState extends State<DesktopUserProfile> {
), ),
Container( Container(
child: Text( 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( style: TextStyle(
color: Colors.grey, color: Colors.grey,
), ),
@@ -306,7 +306,7 @@ class DesktopUserProfileState extends State<DesktopUserProfile> {
), ),
Container( Container(
child: Text( 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( style: TextStyle(
color: Colors.grey, color: Colors.grey,
), ),

View File

@@ -105,7 +105,7 @@ class DesktopViewBlogState extends State<DesktopViewBlog> {
), ),
), ),
Text( Text(
Utils.utcDatetimeStringToLocalDatetimeString(context, blog.createdAt), Utils.utcDatetimeStringToLocalDatetimeString(context, blog.createdAt!),
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: Colors.black38, color: Colors.black38,

View File

@@ -220,14 +220,14 @@ class DesktopViewTicketState extends State<DesktopViewTicket> {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Text( Text(
S.of(context).ticket_number_token(ticket.id), S.of(context).ticket_number_token(ticket.id!),
style: TextStyle( style: TextStyle(
fontSize: 24.0, fontSize: 24.0,
color: Colors.black color: Colors.black
), ),
), ),
Text( Text(
Utils.utcDatetimeStringToLocalDatetimeString(context, ticket.createdAt), Utils.utcDatetimeStringToLocalDatetimeString(context, ticket.createdAt!),
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: Colors.black38, color: Colors.black38,
@@ -331,7 +331,7 @@ class DesktopViewTicketState extends State<DesktopViewTicket> {
Text( Text(
Utils.utcDatetimeStringToLocalDatetimeString( Utils.utcDatetimeStringToLocalDatetimeString(
context, context,
followUp.createdAt followUp.createdAt!
), ),
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
@@ -364,7 +364,7 @@ class DesktopViewTicketState extends State<DesktopViewTicket> {
child: SingleChildScrollView( child: SingleChildScrollView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
child: showGalleryImages( child: showGalleryImages(
mainContext, followUp.files, mainContext, followUp.files!,
), ),
), ),
), ),

View File

@@ -125,7 +125,7 @@ class ProductItemState extends State<ProductItem> {
), ),
), ),
Text( Text(
widget.product.description, widget.product.description!,
// overflow: kIsWeb ? null : TextOverflow.ellipsis, // overflow: kIsWeb ? null : TextOverflow.ellipsis,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 2, maxLines: 2,
@@ -150,7 +150,7 @@ class ProductItemState extends State<ProductItem> {
) : SizedBox.shrink(), ) : SizedBox.shrink(),
), ),
ShowPrice( ShowPrice(
widget.product.price, widget.product.price!,
regularPrice: widget.product.regularPrice, regularPrice: widget.product.regularPrice,
currencySign: '\$', currencySign: '\$',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@@ -212,7 +212,7 @@ class ProductItemState extends State<ProductItem> {
), ),
Container( Container(
child: Text( child: Text(
widget.product.description, widget.product.description!,
// overflow: kIsWeb ? null : TextOverflow.ellipsis, // overflow: kIsWeb ? null : TextOverflow.ellipsis,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 2, maxLines: 2,
@@ -238,7 +238,7 @@ class ProductItemState extends State<ProductItem> {
) : SizedBox.shrink(), ) : SizedBox.shrink(),
), ),
ShowPrice( ShowPrice(
widget.product.price, widget.product.price!,
regularPrice: widget.product.regularPrice, regularPrice: widget.product.regularPrice,
currencySign: '\$', currencySign: '\$',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,

View File

@@ -144,7 +144,7 @@ class ProductSearchState extends State<ProductSearch> {
if (result.response != null) { if (result.response != null) {
throw RuntimeError(result.response!.data); throw RuntimeError(result.response!.data);
} else { } else {
throw RuntimeError(result.message); throw RuntimeError(result.message!);
} }
} else if (result != null && result is List) { } else if (result != null && result is List) {
lastBottomPosition = 0; lastBottomPosition = 0;

View File

@@ -206,7 +206,7 @@ class ShopState extends State<Shop> {
} }
_productCurrentPage = 1; _productCurrentPage = 1;
Utils.loadProducts( Utils.loadProducts(
widget.businessId, categoryId, _productCurrentPage, false, widget.businessId!, categoryId, _productCurrentPage, false,
(value) { (value) {
if (_isLoading) { if (_isLoading) {
_isLoading = false; _isLoading = false;
@@ -251,7 +251,7 @@ class ShopState extends State<Shop> {
return; return;
} }
_productCurrentPage += 1; _productCurrentPage += 1;
Utils.loadProducts(widget.businessId, categoryId, _productCurrentPage, true, (value) { Utils.loadProducts(widget.businessId!, categoryId, _productCurrentPage, true, (value) {
if (_isLoading) { if (_isLoading) {
_isLoading = false; _isLoading = false;
Navigator.of(context).pop(); Navigator.of(context).pop();

View File

@@ -50,7 +50,7 @@ class ShopBulletinState extends State<ShopBulletin> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.orangeAccent, color: Colors.orangeAccent,
border: Border.all( border: Border.all(
color: Colors.red[500], color: Colors.red[500]!,
width: 1.0, width: 1.0,
), ),
borderRadius: BorderRadius.all(Radius.circular(16)), borderRadius: BorderRadius.all(Radius.circular(16)),

View File

@@ -135,7 +135,7 @@ class ShopProductsState extends State<ShopProducts> {
child: Container( child: Container(
margin: EdgeInsets.only(top: 5.0, bottom: 5.0), margin: EdgeInsets.only(top: 5.0, bottom: 5.0),
child: Text( child: Text(
cp.name, cp.name!,
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
fontWeight: (cp.id == Constants.FEATURED_PRODUCT_ID || fontWeight: (cp.id == Constants.FEATURED_PRODUCT_ID ||
@@ -182,7 +182,7 @@ class ShopProductsState extends State<ShopProducts> {
new BorderSide(color: new Color(0xFFEBEBEB)))), new BorderSide(color: new Color(0xFFEBEBEB)))),
child: categoryRow, child: categoryRow,
), ),
onTap: () => _selectCategory(cp.id), onTap: () => _selectCategory(cp.id!),
); );
} }
), ),
@@ -207,7 +207,7 @@ class ShopProductsState extends State<ShopProducts> {
CategoryProducts cp = _categoryProducts[i]; CategoryProducts cp = _categoryProducts[i];
if (cp.products!.length > 0) { if (cp.products!.length > 0) {
col.children.add(new Container( col.children.add(new Container(
height: _categoryDescHeight, height: _categoryDescHeight!,
padding: new EdgeInsets.symmetric(horizontal: 10.0), padding: new EdgeInsets.symmetric(horizontal: 10.0),
color: new Color(0xFFF5F5F5), color: new Color(0xFFF5F5F5),
child: new Row( child: new Row(
@@ -221,7 +221,7 @@ class ShopProductsState extends State<ShopProducts> {
new Padding( new Padding(
padding: new EdgeInsets.only(right: 5.0), padding: new EdgeInsets.only(right: 5.0),
child: new Text( child: new Text(
cp.name, cp.name!,
style: new TextStyle( style: new TextStyle(
fontSize: 16.0, fontSize: 16.0,
fontWeight: fontWeight:
@@ -241,7 +241,7 @@ class ShopProductsState extends State<ShopProducts> {
new Visibility( new Visibility(
visible: cp.description!.isNotEmpty, visible: cp.description!.isNotEmpty,
child: new Text( child: new Text(
cp.description, cp.description!,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: new TextStyle( style: new TextStyle(
fontSize: 10.0, fontSize: 10.0,
@@ -388,7 +388,7 @@ class ShopProductsState extends State<ShopProducts> {
CategoryProducts currentCp = CategoryProducts currentCp =
getCategoryProductByCategoryId(categoryId); getCategoryProductByCategoryId(categoryId);
if (currentCp != null) { if (currentCp != null) {
currentCp.products!.addAll(moreCategoryProducts[0].products); currentCp.products!.addAll(moreCategoryProducts[0].products!);
} else { } else {
displayProductByCategoryClickIndicator = S displayProductByCategoryClickIndicator = S
.of(context) .of(context)

View File

@@ -60,7 +60,7 @@ class ShoppingCartWidgetState extends State<ShoppingCartWidget> {
child: row, child: row,
width: 160.0, width: 160.0,
), ),
onTap: widget.onTap, onTap: widget.onTap!,
), ),
); );
} }

View File

@@ -61,7 +61,7 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (widget.product!.leftNum == null) { if (widget.product!.leftNum == null) {
_qty = 0; _qty = 0;
cartInfo = Utils.getCartInfoByBusiness(store.state.cartInfos, widget.business); cartInfo = Utils.getCartInfoByBusiness(store.state.cartInfos, widget.business!);
if (cartInfo != null) { if (cartInfo != null) {
for (var i = 0; i < cartInfo.productList!.length; i++) { for (var i = 0; i < cartInfo.productList!.length; i++) {
if (cartInfo.productList![i].product!.id == widget.product!.id if (cartInfo.productList![i].product!.id == widget.product!.id
@@ -102,7 +102,7 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
} }
if (widget.addToBasket) { if (widget.addToBasket) {
_qty = 0; _qty = 0;
cartInfo = Utils.getCartInfoByBusiness(store.state.cartInfos, widget.business); cartInfo = Utils.getCartInfoByBusiness(store.state.cartInfos, widget.business!);
if (cartInfo != null) { if (cartInfo != null) {
for (var i = 0; i < cartInfo.productList!.length; i++) { for (var i = 0; i < cartInfo.productList!.length; i++) {
if (cartInfo.productList![i].product!.id == widget.product!.id) { if (cartInfo.productList![i].product!.id == widget.product!.id) {
@@ -195,7 +195,7 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
); );
} else { } else {
_qty = 0; _qty = 0;
cartInfo = Utils.getCartInfoByBusiness(store.state.cartInfos, widget.business); cartInfo = Utils.getCartInfoByBusiness(store.state.cartInfos, widget.business!);
if (cartInfo != null) { if (cartInfo != null) {
for (var i = 0; i < cartInfo.productList!.length; i++) { for (var i = 0; i < cartInfo.productList!.length; i++) {
if (cartInfo.productList![i].product!.id == widget.product!.id) { if (cartInfo.productList![i].product!.id == widget.product!.id) {
@@ -336,9 +336,9 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
product: widget.product, business: widget.business, startKey: startKey,)), product: widget.product, business: widget.business, startKey: startKey,)),
); );
} else { } else {
eventBus.fire(new OnProductWillAddToCart(widget.product, {}, eventBus.fire(new OnProductWillAddToCart(widget.product!, {},
widget.product!.price, widget.product!.description, widget.product!.price, widget.product!.description,
widget.business, buttonKey: startKey)); widget.business!, buttonKey: startKey));
} }
} }
} }
@@ -375,7 +375,7 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
} }
} else { } else {
eventBus.fire(new OnProductWillRemoveFromCart( eventBus.fire(new OnProductWillRemoveFromCart(
widget.product, -1, widget.business)); widget.product!, -1, widget.business!));
} }
} }

View File

@@ -24,7 +24,7 @@ class AnimationPointManager {
Animation animation = createAnimation(controller1); Animation animation = createAnimation(controller1);
AnimatedWidget animatedWidget = ParabolicAnimationWidget( AnimatedWidget animatedWidget = ParabolicAnimationWidget(
animation: animation, animation: animation!,
stackKey: stackKey, stackKey: stackKey,
startKey: startKey, startKey: startKey,
endKey: endKey, endKey: endKey,
@@ -59,7 +59,7 @@ class AnimationPointManager {
Offset popupOffset = Offset.zero, Offset popupOffset = Offset.zero,
AnimationStatusListener? statusListener, AnimationStatusListener? statusListener,
}) async { }) async {
controller2 = createController(vsync, duration); controller2 = createController(vsync, duration!);
AnimatedWidget animatedWidget = PopupAnimationWidget( AnimatedWidget animatedWidget = PopupAnimationWidget(
animation: controller2.view, animation: controller2.view,

View File

@@ -133,7 +133,7 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
if (selections.containsKey(product.productAttributes![index].name!.toUpperCase())) { if (selections.containsKey(product.productAttributes![index].name!.toUpperCase())) {
Map<String, dynamic> attrExtraJson = Utils.stringToJson( Map<String, dynamic> attrExtraJson = Utils.stringToJson(!
product.productAttributes![index].extra); product.productAttributes![index].extra);
if (attrExtraJson != null) { if (attrExtraJson != null) {
var selectLimitIfFieldEqualsTo = Rule.getRule( var selectLimitIfFieldEqualsTo = Rule.getRule(
@@ -187,17 +187,17 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
} }
for (var i = 0; i < productOptions.length; i++) { for (var i = 0; i < productOptions.length; i++) {
Map<String, dynamic> extraJson = Utils.stringToJson( Map<String, dynamic> extraJson = Utils.stringToJson(!
productOptions[i].extra); productOptions[i].extra!);
if (extraJson != null) { if (extraJson != null) {
Map<String, dynamic> exclusiveRule = Rule.getRule( Map<String, dynamic> exclusiveRule = Rule.getRule(
extraJson, Rule.RULE_EXCLUSIVE_SELECTION); extraJson, Rule.RULE_EXCLUSIVE_SELECTION);
Map<String, dynamic> multiItemRule = Rule.getRule(extraJson, Rule.RULE_ACTUAL_QTY_IS); Map<String, dynamic> multiItemRule = Rule.getRule(extraJson, Rule.RULE_ACTUAL_QTY_IS);
if (exclusiveRule != null) { if (exclusiveRule != null) {
if (thisLimitQty > 0 && !_checkOptionIsCheck(productOptions[i].name)) { if (thisLimitQty > 0 && !_checkOptionIsCheck(productOptions[i].name!)) {
optionsState[product.productAttributes![index].name][i]['disabled'] = true; optionsState[product.productAttributes![index].name][i]['disabled'] = true;
} else { } else {
if (_checkOptionIsCheck(productOptions[i].name)) { if (_checkOptionIsCheck(productOptions[i].name!)) {
setOptionsStateDisabled( setOptionsStateDisabled(
product.productAttributes![index].name, true); product.productAttributes![index].name, true);
optionsState[product.productAttributes![index] optionsState[product.productAttributes![index]
@@ -207,7 +207,7 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
} }
} }
if (multiItemRule != null) { if (multiItemRule != null) {
if (_checkOptionIsCheck(productOptions[i].name)) { if (_checkOptionIsCheck(productOptions[i].name!)) {
if (multiItemRule[Rule.RULE_ACTUAL_QTY_IS] > thisLimitQty - (selections[product.productAttributes![index].name!.toUpperCase()] as List).length) { if (multiItemRule[Rule.RULE_ACTUAL_QTY_IS] > thisLimitQty - (selections[product.productAttributes![index].name!.toUpperCase()] as List).length) {
disableOptionIfNotSelected(); disableOptionIfNotSelected();
} }
@@ -249,9 +249,9 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
Widget _getOptionCheck(ProductOption productOption, bool optDisabled, int optIndex) { Widget _getOptionCheck(ProductOption productOption, bool optDisabled, int optIndex) {
bool disabled = optDisabled; bool disabled = optDisabled;
bool check = _checkOptionIsCheck(productOption.name); bool check = _checkOptionIsCheck(productOption.name!);
Map<String, dynamic> extraJson = Utils.stringToJson(productOption.extra); Map<String, dynamic> extraJson = Utils.stringToJson(productOption.extra!);
// Utils.jsonPrettyPrint(extraJson); // Utils.jsonPrettyPrint(extraJson);
double extraAdjustAmount = 0.0; double extraAdjustAmount = 0.0;
@@ -333,7 +333,7 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
new Text( new Text(
productOption.name, productOption.name!,
style: new TextStyle( style: new TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: check ? selectedTextColor : deselectTextColor, color: check ? selectedTextColor : deselectTextColor,

View File

@@ -131,7 +131,7 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
List<Map<String, dynamic>> optionState = []; List<Map<String, dynamic>> optionState = [];
for (var i = 0; i < productOptions.length; i++) { for (var i = 0; i < productOptions.length; i++) {
int qty = 0; int qty = 0;
int idx = Utils.selectionsContains(selections, product.productAttributes![index].name, productOptions[i].name); int idx = Utils.selectionsContains(selections, product.productAttributes![index].name, productOptions[i].name!);
if (idx != -1) { if (idx != -1) {
qty = selections[product.productAttributes![index].name!.toUpperCase()][idx]['quantity']; qty = selections[product.productAttributes![index].name!.toUpperCase()][idx]['quantity'];
} }
@@ -141,7 +141,7 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
} }
if (selections.containsKey(product.productAttributes![index].name!.toUpperCase())) { if (selections.containsKey(product.productAttributes![index].name!.toUpperCase())) {
Map<String, dynamic> attrExtraJson = Utils.stringToJson( Map<String, dynamic> attrExtraJson = Utils.stringToJson(!
product.productAttributes![index].extra); product.productAttributes![index].extra);
if (attrExtraJson != null) { if (attrExtraJson != null) {
var selectLimitIfFieldEqualsTo = Rule.getRule( var selectLimitIfFieldEqualsTo = Rule.getRule(
@@ -195,17 +195,17 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
} }
for (var i = 0; i < productOptions.length; i++) { for (var i = 0; i < productOptions.length; i++) {
Map<String, dynamic> extraJson = Utils.stringToJson( Map<String, dynamic> extraJson = Utils.stringToJson(!
productOptions[i].extra); productOptions[i].extra!);
if (extraJson != null) { if (extraJson != null) {
Map<String, dynamic> exclusiveRule = Rule.getRule( Map<String, dynamic> exclusiveRule = Rule.getRule(
extraJson, Rule.RULE_EXCLUSIVE_SELECTION); extraJson, Rule.RULE_EXCLUSIVE_SELECTION);
Map<String, dynamic> multiItemRule = Rule.getRule(extraJson, Rule.RULE_ACTUAL_QTY_IS); Map<String, dynamic> multiItemRule = Rule.getRule(extraJson, Rule.RULE_ACTUAL_QTY_IS);
if (exclusiveRule != null) { if (exclusiveRule != null) {
if (thisLimitQty > 0 && !_checkOptionIsCheck(productOptions[i].name)) { if (thisLimitQty > 0 && !_checkOptionIsCheck(productOptions[i].name!)) {
optionsState[product.productAttributes![index].name][i]['disabled'] = true; optionsState[product.productAttributes![index].name][i]['disabled'] = true;
} else { } else {
if (_checkOptionIsCheck(productOptions[i].name)) { if (_checkOptionIsCheck(productOptions[i].name!)) {
setOptionsStateDisabled( setOptionsStateDisabled(
product.productAttributes![index].name, true); product.productAttributes![index].name, true);
optionsState[product.productAttributes![index] optionsState[product.productAttributes![index]
@@ -215,7 +215,7 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
} }
} }
if (multiItemRule != null) { if (multiItemRule != null) {
if (_checkOptionIsCheck(productOptions[i].name)) { if (_checkOptionIsCheck(productOptions[i].name!)) {
if (multiItemRule[Rule.RULE_ACTUAL_QTY_IS] > thisLimitQty - (selections[product.productAttributes![index].name!.toUpperCase()] as List).length) { if (multiItemRule[Rule.RULE_ACTUAL_QTY_IS] > thisLimitQty - (selections[product.productAttributes![index].name!.toUpperCase()] as List).length) {
disableOptionIfNotSelected(); disableOptionIfNotSelected();
} }
@@ -257,9 +257,9 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
Widget _getOptionQty(ProductOption productOption, bool optDisabled, int quantity, int optIndex) { Widget _getOptionQty(ProductOption productOption, bool optDisabled, int quantity, int optIndex) {
bool disabled = optDisabled; bool disabled = optDisabled;
bool check = _checkOptionIsCheck(productOption.name); bool check = _checkOptionIsCheck(productOption.name!);
Map<String, dynamic> extraJson = Utils.stringToJson(productOption.extra); Map<String, dynamic> extraJson = Utils.stringToJson(productOption.extra!);
// Utils.jsonPrettyPrint(extraJson); // Utils.jsonPrettyPrint(extraJson);
double extraAdjustAmount = 0.0; double extraAdjustAmount = 0.0;
@@ -351,7 +351,7 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
new Text( new Text(
productOption.name, productOption.name!,
style: new TextStyle( style: new TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: check ? selectedTextColor : deselectTextColor, color: check ? selectedTextColor : deselectTextColor,

View File

@@ -96,12 +96,12 @@ class RadioOptionsState extends OptionsBaseState<RadioOptions> {
} }
} }
Map<String, dynamic> extraJson = Utils.stringToJson(productOption.extra); Map<String, dynamic> extraJson = Utils.stringToJson(productOption.extra!);
if (extraJson != null) { if (extraJson != null) {
Map<String, dynamic> exclusiveRule = Rule.getRule( Map<String, dynamic> exclusiveRule = Rule.getRule(
extraJson, Rule.RULE_EXCLUSIVE_SELECTION); extraJson, Rule.RULE_EXCLUSIVE_SELECTION);
if (exclusiveRule != null) { if (exclusiveRule != null) {
if (_checkOptionIsCheck(productOption.name)) { if (_checkOptionIsCheck(productOption.name!)) {
setOptionsStateDisabled(product.productAttributes![index].name, false); setOptionsStateDisabled(product.productAttributes![index].name, false);
} }
} }
@@ -129,12 +129,12 @@ class RadioOptionsState extends OptionsBaseState<RadioOptions> {
} }
for (var i = 0; i < productOptions.length; i++) { for (var i = 0; i < productOptions.length; i++) {
Map<String, dynamic> extraJson = Utils.stringToJson(productOptions[i].extra); Map<String, dynamic> extraJson = Utils.stringToJson(productOptions[i].extra!);
if (extraJson != null) { if (extraJson != null) {
Map<String, dynamic> exclusiveRule = Rule.getRule( Map<String, dynamic> exclusiveRule = Rule.getRule(
extraJson, Rule.RULE_EXCLUSIVE_SELECTION); extraJson, Rule.RULE_EXCLUSIVE_SELECTION);
if (exclusiveRule != null) { if (exclusiveRule != null) {
if (_checkOptionIsCheck(productOptions[i].name)) { if (_checkOptionIsCheck(productOptions[i].name!)) {
setOptionsStateDisabled(product.productAttributes![index].name, true); setOptionsStateDisabled(product.productAttributes![index].name, true);
optionsState[product.productAttributes![index].name][i]['disabled'] = false; optionsState[product.productAttributes![index].name][i]['disabled'] = false;
break; break;
@@ -161,9 +161,9 @@ class RadioOptionsState extends OptionsBaseState<RadioOptions> {
Widget _getOptionRadio(ProductOption productOption, bool optDisabled, int optIndex) { Widget _getOptionRadio(ProductOption productOption, bool optDisabled, int optIndex) {
bool disabled = optDisabled; bool disabled = optDisabled;
bool check = _checkOptionIsCheck(productOption.name); bool check = _checkOptionIsCheck(productOption.name!);
Map<String, dynamic> extraJson = Utils.stringToJson(productOption.extra); Map<String, dynamic> extraJson = Utils.stringToJson(productOption.extra!);
// Utils.jsonPrettyPrint(extraJson); // Utils.jsonPrettyPrint(extraJson);
double extraAdjustAmount = 0.0; double extraAdjustAmount = 0.0;
@@ -245,7 +245,7 @@ class RadioOptionsState extends OptionsBaseState<RadioOptions> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
new Text( new Text(
productOption.name, productOption.name!,
style: new TextStyle( style: new TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: check ? selectedTextColor : deselectTextColor, color: check ? selectedTextColor : deselectTextColor,

View File

@@ -36,7 +36,7 @@ class ShowPrice extends StatelessWidget {
Container( Container(
padding: EdgeInsets.only(top: largeFontSize / 10.0), padding: EdgeInsets.only(top: largeFontSize / 10.0),
child: Text( child: Text(
currencySign, currencySign!,
style: TextStyle( style: TextStyle(
fontSize: smallFontSize, fontSize: smallFontSize,
color: color, color: color,

View File

@@ -258,7 +258,7 @@ class _SlidingUpPanelState extends State<SlidingUpPanel> with SingleTickerProvid
builder: (context, child){ builder: (context, child){
return Positioned( return Positioned(
top: widget.parallaxEnabled ? _getParallax() : 0.0, top: widget.parallaxEnabled ? _getParallax() : 0.0,
child: child, child: child!,
); );
}, },
child: Container( child: Container(
@@ -334,14 +334,14 @@ class _SlidingUpPanelState extends State<SlidingUpPanel> with SingleTickerProvid
widget.header != null ? Positioned( widget.header != null ? Positioned(
top: widget.slideDirection == SlideDirection.UP ? 0.0 : null, top: widget.slideDirection == SlideDirection.UP ? 0.0 : null,
bottom: widget.slideDirection == SlideDirection.DOWN ? 0.0 : null, bottom: widget.slideDirection == SlideDirection.DOWN ? 0.0 : null,
child: widget.header, child: widget.header!,
) : Container(), ) : Container(),
// footer // footer
widget.footer != null ? Positioned( widget.footer != null ? Positioned(
top: widget.slideDirection == SlideDirection.UP ? null : 0.0, top: widget.slideDirection == SlideDirection.UP ? null : 0.0,
bottom: widget.slideDirection == SlideDirection.DOWN ? null : 0.0, bottom: widget.slideDirection == SlideDirection.DOWN ? null : 0.0,
child: widget.footer child: widget.footer!
) : Container(), ) : Container(),
// collapsed panel // collapsed panel
@@ -471,7 +471,7 @@ class _SlidingUpPanelState extends State<SlidingUpPanel> with SingleTickerProvid
if(v.pixelsPerSecond.dy.abs() >= kSnap*minFlingVelocity || minDistance == d2Snap) if(v.pixelsPerSecond.dy.abs() >= kSnap*minFlingVelocity || minDistance == d2Snap)
_ac.fling(velocity: visualVelocity); _ac.fling(velocity: visualVelocity);
else else
_flingPanelToPosition(widget.snapPoint, visualVelocity); _flingPanelToPosition(widget.snapPoint!, visualVelocity);
// no snap point exists // no snap point exists
}else if(widget.panelSnapping){ }else if(widget.panelSnapping){
@@ -495,7 +495,7 @@ class _SlidingUpPanelState extends State<SlidingUpPanel> with SingleTickerProvid
if(minDistance == d2Close){ if(minDistance == d2Close){
_close(); _close();
}else if(minDistance == d2Snap){ }else if(minDistance == d2Snap){
_flingPanelToPosition(widget.snapPoint, visualVelocity); _flingPanelToPosition(widget.snapPoint!, visualVelocity);
}else{ }else{
_open(); _open();
} }
@@ -561,7 +561,7 @@ class _SlidingUpPanelState extends State<SlidingUpPanel> with SingleTickerProvid
//REQUIRES that widget.snapPoint != null //REQUIRES that widget.snapPoint != null
Future<void> _animatePanelToSnapPoint({Duration? duration, Curve curve = Curves.linear}){ Future<void> _animatePanelToSnapPoint({Duration? duration, Curve curve = Curves.linear}){
assert(widget.snapPoint != null); assert(widget.snapPoint != null);
return _ac.animateTo(widget.snapPoint, duration: duration, curve: curve); return _ac.animateTo(widget.snapPoint!, duration: duration, curve: curve);
} }
//set the panel position to value - must //set the panel position to value - must

View File

@@ -187,7 +187,7 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
onPressed: () { onPressed: () {
Navigator.pushReplacement(context, MaterialPageRoute( Navigator.pushReplacement(context, MaterialPageRoute(
builder: (BuildContext context) => builder: (BuildContext context) =>
BuyService(group.id, Constants.WEB_MINISTORE_SERVICE, BuyService(group.id!, Constants.WEB_MINISTORE_SERVICE,
domain: existing_web_svc['domain'], domain: existing_web_svc['domain'],
sid: existing_web_svc['store']['id'], sid: existing_web_svc['store']['id'],
), ),
@@ -304,7 +304,7 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
onPressed: () { onPressed: () {
Navigator.pushReplacement(context, MaterialPageRoute( Navigator.pushReplacement(context, MaterialPageRoute(
builder: (BuildContext context) => builder: (BuildContext context) =>
BuyService(group.id, Constants.WEB_MINISTORE_SERVICE, BuyService(group.id!, Constants.WEB_MINISTORE_SERVICE,
domain: selectedDomain, domain: selectedDomain,
sid: selectedStore['id'], sid: selectedStore['id'],
), ),

View File

@@ -119,7 +119,7 @@ class MobileAttributeSelectionState extends State<MobileAttributeSelection> {
}); });
ProductAttribute pa = product.productAttributes![index]; ProductAttribute pa = product.productAttributes![index];
if (pa.required && Utils.selectionsNotEmptyAt(selections, pa.name)) { if (pa.required && Utils.selectionsNotEmptyAt(selections, pa.name!)) {
setState(() { setState(() {
nextButtonEnable = true; nextButtonEnable = true;
productDesc = product.description! + ', ' + extendDescription.join('; '); productDesc = product.description! + ', ' + extendDescription.join('; ');
@@ -143,7 +143,7 @@ class MobileAttributeSelectionState extends State<MobileAttributeSelection> {
bool _checkCanGoNext() { bool _checkCanGoNext() {
ProductAttribute pa = product.productAttributes![index]; ProductAttribute pa = product.productAttributes![index];
if (pa.required && Utils.selectionsNotEmptyAt(selections, pa.name)) { if (pa.required && Utils.selectionsNotEmptyAt(selections, pa.name!)) {
return true; return true;
} else if (!pa.required){ } else if (!pa.required){
return true; return true;
@@ -180,7 +180,7 @@ class MobileAttributeSelectionState extends State<MobileAttributeSelection> {
padding: new EdgeInsets.all(10.0), padding: new EdgeInsets.all(10.0),
width: 70.0, width: 70.0,
height: 70.0, height: 70.0,
child: Util.showImage(product.imagePath, child: Util.showImage(product.imagePath!,
width: 70.0, width: 70.0,
height: 70.0, height: 70.0,
fit: BoxFit.fill, fit: BoxFit.fill,
@@ -194,7 +194,7 @@ class MobileAttributeSelectionState extends State<MobileAttributeSelection> {
new Container( new Container(
padding: new EdgeInsets.all(10.0).copyWith(left: 0.0).copyWith(bottom: 0.0), padding: new EdgeInsets.all(10.0).copyWith(left: 0.0).copyWith(bottom: 0.0),
child: new Text( child: new Text(
product.name, product.name!,
style: new TextStyle( style: new TextStyle(
fontSize: 15.0, fontSize: 15.0,
), ),

View File

@@ -165,7 +165,7 @@ class MobileBlogState extends State<MobileBlog> {
children: <Widget>[ children: <Widget>[
Container( Container(
child: Text( child: Text(
blog.title, blog.title!,
style: TextStyle( style: TextStyle(
fontSize: 19.0, fontSize: 19.0,
), ),
@@ -174,7 +174,7 @@ class MobileBlogState extends State<MobileBlog> {
), ),
Container( Container(
child: Text( child: Text(
Utils.utcDatetimeStringToLocalDatetimeString(context, blog.createdAt), Utils.utcDatetimeStringToLocalDatetimeString(context, blog.createdAt!),
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
color: Colors.grey, color: Colors.grey,
@@ -217,7 +217,7 @@ class MobileBlogState extends State<MobileBlog> {
_loadingFinish = false; _loadingFinish = false;
HttpUtil.httpGet( HttpUtil.httpGet(
'v1/blogs', 'v1/blogs',
businessId: widget.businessId, businessId: widget.businessId!,
queryParameters: { queryParameters: {
'page': _page.toString(), 'page': _page.toString(),
'size': Constants.BLOG_PER_PAGE_MOBILE.toString() 'size': Constants.BLOG_PER_PAGE_MOBILE.toString()

View File

@@ -86,7 +86,7 @@ class MobileBuyServiceState extends State<MobileBuyService> {
items: plans.map((e) { items: plans.map((e) {
return DropdownMenuItem<KeyValue>( return DropdownMenuItem<KeyValue>(
value: e, value: e,
child: Text(e.name), child: Text(e.name!),
); );
}).toList(), }).toList(),
isExpanded: true, isExpanded: true,

View File

@@ -281,7 +281,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Text( Text(
S.of(context).table_token(store.state.tableNumber), S.of(context).table_token(store.state.tableNumber!),
style: TextStyle( style: TextStyle(
fontSize: 20.0, fontSize: 20.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@@ -333,7 +333,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
icons: shippingMethodIcons, icons: shippingMethodIcons,
onToggle: (index) { onToggle: (index) {
selectedShippingRate = null; selectedShippingRate = null;
deliveryMethod = getShippingMethod(index); deliveryMethod = getShippingMethod(index!);
check(); check();
}, },
initialLabelIndex: deliveryMethodIndex, initialLabelIndex: deliveryMethodIndex,
@@ -627,7 +627,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
children: <Widget>[ children: <Widget>[
Container( Container(
child: Text( 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) ? '' : ((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 : '')),
), ),
@@ -681,7 +681,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
children: <Widget>[ children: <Widget>[
Container( Container(
child: Text( 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( Container(
@@ -988,14 +988,14 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
children: <Widget>[ children: <Widget>[
Container( Container(
child: Text( child: Text(
Utils.knownName(context, cartLineItem.name), Utils.knownName(context, cartLineItem.name!),
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
), ),
Container( Container(
child: Text( child: Text(
cartLineItem.description, cartLineItem.description!,
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.black38, color: Colors.black38,
@@ -1155,7 +1155,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
column.children.add(Container( column.children.add(Container(
padding: EdgeInsets.only(left: 0.0, right: 0.0, top: 10.0, bottom: 0.0), padding: EdgeInsets.only(left: 0.0, right: 0.0, top: 10.0, bottom: 0.0),
child: Text( child: Text(
Utils.errorMsg2(context, messages[i].code, messages[i].string), Utils.errorMsg2(context, messages[i].code!, messages[i].string!),
), ),
)); ));
} }
@@ -1215,7 +1215,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
child: Container( child: Container(
padding: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 10.0, top: 10.0), padding: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 10.0, top: 10.0),
child: Text( child: Text(
'${Utils.timestampToString(context, bookingTime.unixTime)}', '${Utils.timestampToString(context, bookingTime.unixTime!)}',
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
@@ -1290,7 +1290,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
padding: EdgeInsets.only(left: 10.0, right: 10.0, top: 10.0, bottom: 10.0), padding: EdgeInsets.only(left: 10.0, right: 10.0, top: 10.0, bottom: 10.0),
child: Center( child: Center(
child: Text( child: Text(
'${bookingDateTime.viewDate} (${Utils.getWeekDayName(context, bookingDateTime.unixTime, true)})', '${bookingDateTime.viewDate} (${Utils.getWeekDayName(context, bookingDateTime.unixTime!, true)})',
), ),
), ),
), ),
@@ -1494,7 +1494,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Container( 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,), errorWidget: (context, url, error) => Icon(Icons.broken_image, size: 50.0, color: Colors.transparent,),
fit: BoxFit.cover, fit: BoxFit.cover,
width: 50.0, width: 50.0,
@@ -1504,7 +1504,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
Container( Container(
margin: EdgeInsets.only(left: 10.0), margin: EdgeInsets.only(left: 10.0),
child: Text( child: Text(
PaymentPlatform.getPaymentPlatformName(context, paymentPlatform.code), PaymentPlatform.getPaymentPlatformName(context, paymentPlatform.code!),
style: TextStyle( style: TextStyle(
fontSize: 18.0, fontSize: 18.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@@ -1556,7 +1556,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
for (var i = 0; i < coupons.length; i++) { for (var i = 0; i < coupons.length; i++) {
if (selectedCoupon == coupons[i].id) { if (selectedCoupon == coupons[i].id) {
if (coupons[i].isPercentage) { if (coupons[i].isPercentage) {
return S.of(context).percentage_discount_token2(couponDiscountAmount.toStringAsFixed(2), coupons[i].valueAmount); return S.of(context).percentage_discount_token2(couponDiscountAmount.toStringAsFixed(2), coupons[i].valueAmount!);
} else { } else {
return S.of(context).discount_amount_token(couponDiscountAmount.toStringAsFixed(2)); return S.of(context).discount_amount_token(couponDiscountAmount.toStringAsFixed(2));
} }
@@ -1782,7 +1782,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
Container( Container(
padding: EdgeInsets.only(right: 5.0), padding: EdgeInsets.only(right: 5.0),
child: Text( child: Text(
'${Utils.smartRound(coupon.valueAmount, 2)}', '${Utils.smartRound(coupon.valueAmount!, 2)}',
style: TextStyle( style: TextStyle(
fontSize: 30.0, fontSize: 30.0,
color: Colors.redAccent, color: Colors.redAccent,
@@ -1818,7 +1818,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
), ),
Container( Container(
child: Text( child: Text(
'${Utils.smartRound(coupon.valueAmount, 2)}', '${Utils.smartRound(coupon.valueAmount!, 2)}',
style: TextStyle( style: TextStyle(
fontSize: 30.0, fontSize: 30.0,
color: Colors.redAccent, color: Colors.redAccent,
@@ -1846,7 +1846,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
child: Text( child: Text(
coupon.expirationDate != null ? coupon.expirationDate != null ?
S.of(context).expiration_date_token( S.of(context).expiration_date_token(
coupon.expirationDate) : coupon.expirationDate!) :
S.of(context) S.of(context)
.no_expiration, .no_expiration,
style: TextStyle( style: TextStyle(
@@ -1859,7 +1859,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
child: Text( child: Text(
coupon.minAmount! > 0 ? coupon.minAmount! > 0 ?
S.of(context).min_order_amount_token( S.of(context).min_order_amount_token(
coupon.minAmount) : coupon.minAmount!) :
S.of(context) S.of(context)
.no_restriction, .no_restriction,
style: TextStyle( style: TextStyle(
@@ -2101,7 +2101,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
left: 16.0, top: 16.0, right: 16.0, bottom: 16.0), left: 16.0, top: 16.0, right: 16.0, bottom: 16.0),
child: Container( child: Container(
child: Text( child: Text(
shippingRate.name, shippingRate.name!,
style: TextStyle( style: TextStyle(
fontSize: 20.0, fontSize: 20.0,
), ),

View File

@@ -123,7 +123,7 @@ class MobileCouponsState extends State<MobileCoupons> {
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
Text( Text(
coupon.description, coupon.description!,
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.black26, color: Colors.black26,
@@ -162,7 +162,7 @@ class MobileCouponsState extends State<MobileCoupons> {
), ),
Container( Container(
child: Text( child: Text(
'${Utils.smartRound(coupon.valueAmount, 2)}', '${Utils.smartRound(coupon.valueAmount!, 2)}',
style: TextStyle( style: TextStyle(
fontSize: 28.0, fontSize: 28.0,
color: Colors.redAccent, color: Colors.redAccent,
@@ -177,7 +177,7 @@ class MobileCouponsState extends State<MobileCoupons> {
children: <Widget>[ children: <Widget>[
Container( Container(
child: Text( child: Text(
'${Utils.smartRound(coupon.valueAmount, 2)}', '${Utils.smartRound(coupon.valueAmount!, 2)}',
style: TextStyle( style: TextStyle(
fontSize: 28.0, fontSize: 28.0,
color: Colors.redAccent, color: Colors.redAccent,
@@ -199,7 +199,7 @@ class MobileCouponsState extends State<MobileCoupons> {
Container( Container(
child: Text( child: Text(
coupon.minAmount! > 0 ? 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, S.of(context).no_restriction,
style: TextStyle( style: TextStyle(
fontSize: 10.0, fontSize: 10.0,
@@ -238,7 +238,7 @@ class MobileCouponsState extends State<MobileCoupons> {
child: Text( child: Text(
coupon.expirationDate == null || coupon.expirationDate!.length == 0 ? coupon.expirationDate == null || coupon.expirationDate!.length == 0 ?
S.of(context).no_expiration : S.of(context).no_expiration :
S.of(context).expiration_date_token(coupon.expirationDate), S.of(context).expiration_date_token(coupon.expirationDate!),
style: TextStyle( style: TextStyle(
color: Colors.black26, color: Colors.black26,
fontSize: 15.0, fontSize: 15.0,

View File

@@ -243,7 +243,7 @@ class MobileLoginState extends State<MobileLogin> {
box.put(Constants.KEY_USER_ID, response.data['user_id']); box.put(Constants.KEY_USER_ID, response.data['user_id']);
box.put(Constants.KEY_ACCESS_TOKEN, response.data['access_token']); box.put(Constants.KEY_ACCESS_TOKEN, response.data['access_token']);
if (store.state.redirectRoute != null) { if (store.state.redirectRoute != null) {
Routes.router.navigateTo(context, store.state.redirectRoute, replace: true); Routes.router.navigateTo(context, store.state.redirectRoute!, replace: true);
store.dispatch(UpdateRedirectRoute(null)); store.dispatch(UpdateRedirectRoute(null));
} else { } else {
Routes.router.navigateTo( Routes.router.navigateTo(

View File

@@ -142,7 +142,7 @@ class MobileMeState extends State<MobileMe> {
Container( Container(
child: Text( child: Text(
_user != null _user != null
? Utils.safePhoneNumber(_user.mobile) ? Utils.safePhoneNumber(_user.mobile!)
: '', : '',
style: TextStyle( style: TextStyle(
color: color:

View File

@@ -102,7 +102,7 @@ class MobileMyAddressesState extends State<MobileMyAddresses> {
children: <Widget>[ children: <Widget>[
Container( Container(
child: Text( child: Text(
address.addressLine1, address.addressLine1!,
style: TextStyle( style: TextStyle(
fontSize: 19.0, fontSize: 19.0,
), ),
@@ -110,7 +110,7 @@ class MobileMyAddressesState extends State<MobileMyAddresses> {
), ),
Container( Container(
child: Text( child: Text(
address.addressLine2, address.addressLine2!,
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
color: Colors.grey, color: Colors.grey,
@@ -120,7 +120,7 @@ class MobileMyAddressesState extends State<MobileMyAddresses> {
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text( child: Text(
'${address.contactName} ${Utils.safePhoneNumber(address.phone)}', '${address.contactName} ${Utils.safePhoneNumber(address.phone!)}',
style: TextStyle( style: TextStyle(
fontSize: 15.0, fontSize: 15.0,
color: Colors.black87, color: Colors.black87,
@@ -156,7 +156,7 @@ class MobileMyAddressesState extends State<MobileMyAddresses> {
), ),
onPressed: () { onPressed: () {
Navigator.push(context, MaterialPageRoute( Navigator.push(context, MaterialPageRoute(
builder: (BuildContext context) => new EditAddress(address, businessId: widget.businessId,), builder: (BuildContext context) => new EditAddress(address, businessId: widget.businessId!,),
)); ));
}, },
), ),

View File

@@ -188,7 +188,7 @@ class MobileMySupportState extends State<MobileMySupport> {
), ),
Container( Container(
child: Text( child: Text(
Utils.utcDatetimeStringToLocalDatetimeString(context, ticket.createdAt, withTime: true), Utils.utcDatetimeStringToLocalDatetimeString(context, ticket.createdAt!, withTime: true),
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
color: Colors.grey, color: Colors.grey,
@@ -247,7 +247,7 @@ class MobileMySupportState extends State<MobileMySupport> {
_loadingFinish = false; _loadingFinish = false;
HttpUtil.httpGet( HttpUtil.httpGet(
'v1/mysupport', 'v1/mysupport',
businessId: widget.businessId, businessId: widget.businessId!,
queryParameters: { queryParameters: {
'page': _page.toString(), 'page': _page.toString(),
'size': Constants.TICKET_PER_PAGE_MOBILE.toString() 'size': Constants.TICKET_PER_PAGE_MOBILE.toString()

View File

@@ -217,7 +217,7 @@ class MobileNewCommentState extends State<MobileNewComment> {
child: Text(S.of(context).yes_i_am_sure), child: Text(S.of(context).yes_i_am_sure),
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
_deleteImage(image.id); _deleteImage(image.id!);
}, },
), ),
], ],
@@ -269,7 +269,7 @@ class MobileNewCommentState extends State<MobileNewComment> {
context: mainContext, context: mainContext,
barrierDismissible: true, barrierDismissible: true,
builder: (BuildContext context) { builder: (BuildContext context) {
return Util().getPicture(mainContext, store.state.user, return Util().getPicture(mainContext, store.state.user!,
commentId: comment != null ? comment.id : 0, commentId: comment != null ? comment.id : 0,
orderId: widget.orderId); orderId: widget.orderId);
} }

View File

@@ -520,7 +520,7 @@ class MobileOrderDetailState extends State<MobileOrderDetail> {
margin: EdgeInsets.only(top: 10.0, bottom: 10.0), margin: EdgeInsets.only(top: 10.0, bottom: 10.0),
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: Text( child: Text(
'${Utils.timestampToString(context, order.bookedAt, withTime: true)}', '${Utils.timestampToString(context, order.bookedAt!, withTime: true)}',
style: TextStyle( style: TextStyle(
color: Colors.black38, color: Colors.black38,
), ),
@@ -821,7 +821,7 @@ class MobileOrderDetailState extends State<MobileOrderDetail> {
margin: EdgeInsets.only(top: 10.0, bottom: 10.0), margin: EdgeInsets.only(top: 10.0, bottom: 10.0),
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: Text( child: Text(
Utils.timestampToString(context, order.createdAt, withTime: true), Utils.timestampToString(context, order.createdAt!, withTime: true),
style: TextStyle( style: TextStyle(
color: Colors.black38, color: Colors.black38,
), ),
@@ -877,7 +877,7 @@ class MobileOrderDetailState extends State<MobileOrderDetail> {
), ),
), ),
Text( Text(
Utils.getOrderStatus(context, order.status), Utils.getOrderStatus(context, order.status!),
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
@@ -933,7 +933,7 @@ class MobileOrderDetailState extends State<MobileOrderDetail> {
), ),
Container( Container(
child: Text( child: Text(
'${Utils.utcDatetimeStringToLocalDatetimeString(context, fulfillment.createdAt, withTime: true)}', '${Utils.utcDatetimeStringToLocalDatetimeString(context, fulfillment.createdAt!, withTime: true)}',
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.black26, color: Colors.black26,
@@ -1021,7 +1021,7 @@ class MobileOrderDetailState extends State<MobileOrderDetail> {
S.of(context).order_again, S.of(context).order_again,
), ),
onPressed: () { onPressed: () {
Utils.orderAgain(context, order.cartInfo); Utils.orderAgain(context, order.cartInfo!);
}, },
), ),
), ),

View File

@@ -164,7 +164,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
if (order.cartInfo!.productList!.length > 1) { if (order.cartInfo!.productList!.length > 1) {
row.children.add(Container( row.children.add(Container(
child: Text( 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( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.black26, color: Colors.black26,
@@ -193,7 +193,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
), ),
onPressed: () { onPressed: () {
Navigator.push(context, MaterialPageRoute( Navigator.push(context, MaterialPageRoute(
builder: (BuildContext context) => OrderDetail(order.id, fromOrders: true,), builder: (BuildContext context) => OrderDetail(order.id!, fromOrders: true,),
)); ));
}, },
), ),
@@ -252,7 +252,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
backgroundColor: Theme.of(context).primaryColor, backgroundColor: Theme.of(context).primaryColor,
), ),
onPressed: () { onPressed: () {
Utils.orderAgain(context, order.cartInfo); Utils.orderAgain(context, order.cartInfo!);
}, },
)); ));
} }
@@ -269,7 +269,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
backgroundColor: Theme.of(context).primaryColor, backgroundColor: Theme.of(context).primaryColor,
), ),
onPressed: () { onPressed: () {
Utils.orderAgain(context, order.cartInfo); Utils.orderAgain(context, order.cartInfo!);
}, },
)); ));
} }
@@ -317,7 +317,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
), ),
Container( Container(
child: Text( child: Text(
'#${order.orderNum} ${Utils.timestampToString(context, order.createdAt, withTime: true)}', '#${order.orderNum} ${Utils.timestampToString(context, order.createdAt!, withTime: true)}',
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.black26, color: Colors.black26,
@@ -329,7 +329,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
), ),
onTap: () { onTap: () {
Navigator.push(context, MaterialPageRoute( Navigator.push(context, MaterialPageRoute(
builder: (BuildContext context) => OrderDetail(order.id, fromOrders: true,), builder: (BuildContext context) => OrderDetail(order.id!, fromOrders: true,),
)); ));
}, },
), ),
@@ -340,7 +340,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
children: <Widget>[ children: <Widget>[
Container( Container(
child: Text( child: Text(
'${Utils.getOrderStatus(context, order.status)}', '${Utils.getOrderStatus(context, order.status!)}',
style: TextStyle( style: TextStyle(
fontSize: 15.0, fontSize: 15.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@@ -375,7 +375,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
), ),
onTap: () { onTap: () {
Navigator.push(context, MaterialPageRoute( Navigator.push(context, MaterialPageRoute(
builder: (BuildContext context) => OrderDetail(order.id, fromOrders: true,), builder: (BuildContext context) => OrderDetail(order.id!, fromOrders: true,),
)); ));
}, },
), ),

View File

@@ -162,7 +162,7 @@ class MobilePayNowState extends State<MobilePayNow> {
children: <Widget>[ children: <Widget>[
Container( Container(
padding: EdgeInsets.only(right: 10.0), 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,), errorWidget: (context, url, error) => Icon(Icons.broken_image, size: 50.0, color: Colors.transparent,),
fit: BoxFit.cover, fit: BoxFit.cover,
width: 50.0, width: 50.0,
@@ -171,7 +171,7 @@ class MobilePayNowState extends State<MobilePayNow> {
), ),
Expanded( Expanded(
child: Text( 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( style: TextStyle(
fontSize: 18.0, fontSize: 18.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,

View File

@@ -28,7 +28,7 @@ class MobilePlainPageState extends State<MobilePlainPage> {
padding: EdgeInsets.only(top: 20, left: 16.0, right: 16.0, bottom: 16.0), padding: EdgeInsets.only(top: 20, left: 16.0, right: 16.0, bottom: 16.0),
child: Center( child: Center(
child: Text( child: Text(
widget.blog.title, widget.blog.title!,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 20, fontSize: 20,
@@ -40,7 +40,7 @@ class MobilePlainPageState extends State<MobilePlainPage> {
padding: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 20.0), padding: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 20.0),
child: MarkdownBody( child: MarkdownBody(
shrinkWrap: true, shrinkWrap: true,
data: widget.blog.body, data: widget.blog.body!,
), ),
)); ));
@@ -52,7 +52,7 @@ class MobilePlainPageState extends State<MobilePlainPage> {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
), ),
title: Text(widget.blog.title), title: Text(widget.blog.title!),
backgroundColor: Theme.of(context).primaryColor, backgroundColor: Theme.of(context).primaryColor,
), ),
body: SingleChildScrollView( body: SingleChildScrollView(

View File

@@ -133,7 +133,7 @@ class MobileProductDetailPageState extends State<MobileProductDetailPage>
padding: padding:
EdgeInsets.only(left: 10.0, top: 5.0, right: 10.0), EdgeInsets.only(left: 10.0, top: 5.0, right: 10.0),
child: Text( child: Text(
productDetail.name, productDetail.name!,
style: TextStyle( style: TextStyle(
fontSize: 15.0, fontWeight: FontWeight.bold), fontSize: 15.0, fontWeight: FontWeight.bold),
maxLines: 1, maxLines: 1,
@@ -144,7 +144,7 @@ class MobileProductDetailPageState extends State<MobileProductDetailPage>
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
ShowPrice( ShowPrice(
productDetail.price, productDetail.price!,
currencySign: '\$', currencySign: '\$',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
smallFontSize: 14, smallFontSize: 14,
@@ -205,13 +205,13 @@ class MobileProductDetailPageState extends State<MobileProductDetailPage>
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
(productDetail.subproducts!.length > 0) ? (productDetail.subproducts!.length > 0) ?
subProducts(productDetail.subproducts) : subProducts(productDetail.subproducts!) :
SizedBox.shrink(), SizedBox.shrink(),
Container( Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 10.0, left: 10.0, right: 10.0), top: 10.0, left: 10.0, right: 10.0),
child: Text( child: Text(
productDetail.description, productDetail.description!,
style: TextStyle( style: TextStyle(
fontSize: 14.0, color: Colors.black54), fontSize: 14.0, color: Colors.black54),
), ),
@@ -250,7 +250,7 @@ class MobileProductDetailPageState extends State<MobileProductDetailPage>
children: <Widget>[ children: <Widget>[
Container( Container(
child: Text( child: Text(
S.of(context).weight_token(productDetail.weight), S.of(context).weight_token(productDetail.weight!),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.black54, color: Colors.black54,
@@ -260,9 +260,9 @@ class MobileProductDetailPageState extends State<MobileProductDetailPage>
Container( Container(
child: Text( child: Text(
S.of(context).dimentions_token( S.of(context).dimentions_token(
productDetail.dimentionsLength, productDetail.dimentionsLength!,
productDetail.dimentionsWidth, productDetail.dimentionsWidth!,
productDetail.dimentionsHeight), productDetail.dimentionsHeight!),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.black54, color: Colors.black54,
@@ -291,7 +291,7 @@ class MobileProductDetailPageState extends State<MobileProductDetailPage>
_tabController = TabController(vsync: this, length: 2); _tabController = TabController(vsync: this, length: 2);
HttpUtil.httpGet( HttpUtil.httpGet(
'v1/product-detail/${widget.product.id}', 'v1/product-detail/${widget.product.id}',
businessId: widget.business.id, businessId: widget.business.id!,
).then((value) { ).then((value) {
productDetail = ProductDetail.fromJson(value); productDetail = ProductDetail.fromJson(value);
setState(() { setState(() {
@@ -418,7 +418,7 @@ class MobileProductDetailPageState extends State<MobileProductDetailPage>
List<Widget> _getProductPictures(BuildContext context) { List<Widget> _getProductPictures(BuildContext context) {
var pages = <Widget>[]; var pages = <Widget>[];
List<String> images = []; List<String> images = [];
images.add(productDetail.image); images.add(productDetail.image!);
for (var i = 0; i < productDetail.images!.length; i++) { for (var i = 0; i < productDetail.images!.length; i++) {
// print('>>https:' + productDetail.images[i].image); // print('>>https:' + productDetail.images[i].image);
images.add(productDetail.images![i].image); images.add(productDetail.images![i].image);

View File

@@ -55,8 +55,8 @@ class MobileSearchPlaceState extends State<MobileSearchPlace> {
onSearch: search, onSearch: search,
onItemFound: (LocatedAddress locatedAddress, int index) { onItemFound: (LocatedAddress locatedAddress, int index) {
return ListTile( return ListTile(
title: Text(locatedAddress.streetName), title: Text(locatedAddress.streetName!),
subtitle: Text(locatedAddress.formattedAddress), subtitle: Text(locatedAddress.formattedAddress!),
onTap: () { onTap: () {
if (widget.businessId == 0) { if (widget.businessId == 0) {
_selectPlace(locatedAddress); _selectPlace(locatedAddress);
@@ -109,7 +109,7 @@ class MobileSearchPlaceState extends State<MobileSearchPlace> {
if (result.response != null) { if (result.response != null) {
throw RuntimeError(result.response!.data['message']); throw RuntimeError(result.response!.data['message']);
} else { } else {
throw RuntimeError(result.message); throw RuntimeError(result.message!);
} }
} else if (result != null && result is List) { } else if (result != null && result is List) {
return result.map((e) => LocatedAddress.fromJson(e)).toList(); return result.map((e) => LocatedAddress.fromJson(e)).toList();

View File

@@ -107,7 +107,7 @@ class MobileStoreProductSearchState extends State<MobileStoreProductSearch> {
if (result.response != null) { if (result.response != null) {
throw RuntimeError(result.response!.data); throw RuntimeError(result.response!.data);
} else { } else {
throw RuntimeError(result.message); throw RuntimeError(result.message!);
} }
} else if (result != null && result is List) { } else if (result != null && result is List) {
lastBottomPosition = 0; lastBottomPosition = 0;

View File

@@ -129,7 +129,7 @@ class MobileUserProfileState extends State<MobileUserProfile> {
), ),
Container( Container(
child: Text( child: Text(
_user.nickname, _user.nickname!,
style: TextStyle( style: TextStyle(
color: Colors.grey color: Colors.grey
), ),
@@ -229,7 +229,7 @@ class MobileUserProfileState extends State<MobileUserProfile> {
), ),
Container( Container(
child: Text( 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( style: TextStyle(
color: Colors.grey, color: Colors.grey,
), ),
@@ -282,7 +282,7 @@ class MobileUserProfileState extends State<MobileUserProfile> {
), ),
Container( Container(
child: Text( 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( style: TextStyle(
color: Colors.grey, color: Colors.grey,
), ),

View File

@@ -93,7 +93,7 @@ class MobileViewBlogState extends State<MobileViewBlog> {
), ),
), ),
Text( Text(
Utils.utcDatetimeStringToLocalDatetimeString(context, blog.createdAt), Utils.utcDatetimeStringToLocalDatetimeString(context, blog.createdAt!),
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: Colors.black38, color: Colors.black38,

View File

@@ -103,14 +103,14 @@ class MobileViewTicketState extends State<MobileViewTicket> {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Text( Text(
S.of(context).ticket_number_token(ticket.id), S.of(context).ticket_number_token(ticket.id!),
style: TextStyle( style: TextStyle(
fontSize: 24.0, fontSize: 24.0,
color: Colors.black color: Colors.black
), ),
), ),
Text( Text(
Utils.utcDatetimeStringToLocalDatetimeString(context, ticket.createdAt), Utils.utcDatetimeStringToLocalDatetimeString(context, ticket.createdAt!),
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: Colors.black38, color: Colors.black38,
@@ -211,7 +211,7 @@ class MobileViewTicketState extends State<MobileViewTicket> {
Text( Text(
Utils.utcDatetimeStringToLocalDatetimeString( Utils.utcDatetimeStringToLocalDatetimeString(
context, context,
followUp.createdAt followUp.createdAt!
), ),
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
@@ -242,7 +242,7 @@ class MobileViewTicketState extends State<MobileViewTicket> {
Container( Container(
padding: EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0, bottom: 20.0), padding: EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0, bottom: 20.0),
child: showGalleryImages( child: showGalleryImages(
mainContext, followUp.files, mainContext, followUp.files!,
), ),
), ),
], ],

View File

@@ -99,7 +99,7 @@ class ProductItemState extends State<ProductItem> {
), ),
), ),
Text( Text(
widget.product.description, widget.product.description!,
// overflow: kIsWeb ? null : TextOverflow.ellipsis, // overflow: kIsWeb ? null : TextOverflow.ellipsis,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 2, maxLines: 2,
@@ -134,7 +134,7 @@ class ProductItemState extends State<ProductItem> {
) : SizedBox.shrink(), ) : SizedBox.shrink(),
), ),
ShowPrice( ShowPrice(
widget.product.price, widget.product.price!,
regularPrice: widget.product.regularPrice, regularPrice: widget.product.regularPrice,
currencySign: '\$', currencySign: '\$',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@@ -193,7 +193,7 @@ class ProductItemState extends State<ProductItem> {
), ),
Container( Container(
child: Text( child: Text(
widget.product.description, widget.product.description!,
// overflow: kIsWeb ? null : TextOverflow.ellipsis, // overflow: kIsWeb ? null : TextOverflow.ellipsis,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 2, maxLines: 2,
@@ -219,7 +219,7 @@ class ProductItemState extends State<ProductItem> {
) : SizedBox.shrink(), ) : SizedBox.shrink(),
), ),
ShowPrice( ShowPrice(
widget.product.price, widget.product.price!,
regularPrice: widget.product.regularPrice, regularPrice: widget.product.regularPrice,
currencySign: '\$', currencySign: '\$',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,

View File

@@ -115,7 +115,7 @@ class ProductSearchState extends State<ProductSearch> {
if (result.response != null) { if (result.response != null) {
throw RuntimeError(result.response!.data); throw RuntimeError(result.response!.data);
} else { } else {
throw RuntimeError(result.message); throw RuntimeError(result.message!);
} }
} else if (result != null && result is List) { } else if (result != null && result is List) {
lastBottomPosition = 0; lastBottomPosition = 0;

View File

@@ -140,7 +140,7 @@ class ShopState extends State<Shop>
'page': _commentPage.toString(), 'page': _commentPage.toString(),
'size': Constants.ORDERS_PER_PAGE.toString(), 'size': Constants.ORDERS_PER_PAGE.toString(),
}, },
businessId: _business.id, businessId: _business.id!,
).then((data) { ).then((data) {
if (isRefresh) { if (isRefresh) {
_commentRefreshController.refreshCompleted(); _commentRefreshController.refreshCompleted();
@@ -403,7 +403,7 @@ class ShopState extends State<Shop>
child: new Icon(Icons.phone), child: new Icon(Icons.phone),
onTap: () { onTap: () {
Utils.launchURL( Utils.launchURL(
'tel:${Utils.getFirstNumberFromString(_business.phone)}'); 'tel:${Utils.getFirstNumberFromString(_business.phone!)}');
}, },
), ),
), ),
@@ -628,7 +628,7 @@ class ShopState extends State<Shop>
Container( Container(
padding: EdgeInsets.only(bottom: 16.0), padding: EdgeInsets.only(bottom: 16.0),
child: ReadMoreText( child: ReadMoreText(
comment.replyFromStore, comment.replyFromStore!,
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
color: Colors.black54, color: Colors.black54,
@@ -657,7 +657,7 @@ class ShopState extends State<Shop>
margin: EdgeInsets.only(bottom: 5.0), margin: EdgeInsets.only(bottom: 5.0),
width: double.infinity, width: double.infinity,
child: ReadMoreText( child: ReadMoreText(
comment.content, comment.content!,
trimLines: 3, trimLines: 3,
trimLength: 66, trimLength: 66,
colorClickableText: Colors.blue, colorClickableText: Colors.blue,
@@ -689,10 +689,10 @@ class ShopState extends State<Shop>
), ),
Container( Container(
child: Text( child: Text(
Utils.safeString(comment.contact) + Utils.safeString(comment.contact!) +
' ' + ' ' +
Utils.utcDatetimeStringToLocalDatetimeString( Utils.utcDatetimeStringToLocalDatetimeString(
context, comment.createdAt), context, comment.createdAt!),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.black26, color: Colors.black26,
@@ -825,7 +825,7 @@ class ShopState extends State<Shop>
distanceRow.children.add( distanceRow.children.add(
new Text( new Text(
' / ' + ' / ' +
S.of(context).min_order_amount_token(_business.minPrice) + S.of(context).min_order_amount_token(_business.minPrice!) +
' ', ' ',
style: new TextStyle(fontSize: 13.0, color: const Color(0xFFEEEEEE)), style: new TextStyle(fontSize: 13.0, color: const Color(0xFFEEEEEE)),
), ),
@@ -895,7 +895,7 @@ class ShopState extends State<Shop>
color: Colors.white, color: Colors.white,
), ),
new Text( new Text(
_business.phone, _business.phone!,
style: new TextStyle( style: new TextStyle(
fontSize: 13.0, color: const Color(0xFFEEEEEE)), fontSize: 13.0, color: const Color(0xFFEEEEEE)),
) )
@@ -996,7 +996,7 @@ class ShopState extends State<Shop>
padding: padding:
EdgeInsets.only(left: 10.0, right: 10.0, top: 5.0, bottom: 5.0), EdgeInsets.only(left: 10.0, right: 10.0, top: 5.0, bottom: 5.0),
child: Text( child: Text(
_business.description, _business.description!,
style: TextStyle( style: TextStyle(
color: Colors.lightGreen, color: Colors.lightGreen,
fontSize: 12.0, fontSize: 12.0,
@@ -1040,7 +1040,7 @@ class ShopState extends State<Shop>
padding: EdgeInsets.only(left: 10.0, right: 10.0, bottom: 10.0), padding: EdgeInsets.only(left: 10.0, right: 10.0, bottom: 10.0),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Text( child: Text(
_business.policy, _business.policy!,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
fontSize: 10.0, fontSize: 10.0,
@@ -1062,7 +1062,7 @@ class ShopState extends State<Shop>
right: 0, right: 0,
bottom: 0, bottom: 0,
child: Util.showImage( child: Util.showImage(
_business.bannerImageUrl, _business.bannerImageUrl!,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
@@ -1158,7 +1158,7 @@ class ShopState extends State<Shop>
child: Container( child: Container(
margin: EdgeInsets.only(top: 5.0, bottom: 5.0), margin: EdgeInsets.only(top: 5.0, bottom: 5.0),
child: Text( child: Text(
cp.name, cp.name!,
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
fontWeight: (cp.id == Constants.FEATURED_PRODUCT_ID || fontWeight: (cp.id == Constants.FEATURED_PRODUCT_ID ||
@@ -1371,7 +1371,7 @@ class ShopState extends State<Shop>
children: <Widget>[], children: <Widget>[],
); );
col.children.add(new Container( col.children.add(new Container(
height: _categoryDescHeight, height: _categoryDescHeight!,
padding: new EdgeInsets.symmetric(horizontal: 10.0), padding: new EdgeInsets.symmetric(horizontal: 10.0),
color: new Color(0xFFF5F5F5), color: new Color(0xFFF5F5F5),
child: new Row( child: new Row(
@@ -1385,7 +1385,7 @@ class ShopState extends State<Shop>
new Padding( new Padding(
padding: new EdgeInsets.only(right: 5.0), padding: new EdgeInsets.only(right: 5.0),
child: new Text( child: new Text(
cp.name, cp.name!,
style: new TextStyle( style: new TextStyle(
fontSize: 16.0, fontSize: 16.0,
fontWeight: fontWeight:
@@ -1405,7 +1405,7 @@ class ShopState extends State<Shop>
new Visibility( new Visibility(
visible: cp.description!.isNotEmpty, visible: cp.description!.isNotEmpty,
child: new Text( child: new Text(
cp.description, cp.description!,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: new TextStyle( style: new TextStyle(
fontSize: 10.0, fontSize: 10.0,
@@ -1532,7 +1532,7 @@ class ShopState extends State<Shop>
} }
_productCurrentPage = 1; _productCurrentPage = 1;
Utils.loadProducts( Utils.loadProducts(
widget.businessId, categoryId, _productCurrentPage, false, widget.businessId!, categoryId, _productCurrentPage, false,
(value) { (value) {
if (_isLoading) { if (_isLoading) {
_isLoading = false; _isLoading = false;
@@ -1605,7 +1605,7 @@ class ShopState extends State<Shop>
return; return;
} }
_productCurrentPage += 1; _productCurrentPage += 1;
Utils.loadProducts(widget.businessId, categoryId, _productCurrentPage, true, Utils.loadProducts(widget.businessId!, categoryId, _productCurrentPage, true,
(value) { (value) {
if (_isLoading) { if (_isLoading) {
_isLoading = false; _isLoading = false;
@@ -1631,7 +1631,7 @@ class ShopState extends State<Shop>
CategoryProducts currentCp = CategoryProducts currentCp =
getCategoryProductByCategoryId(categoryId); getCategoryProductByCategoryId(categoryId);
if (currentCp != null) { if (currentCp != null) {
currentCp.products!.addAll(moreCategoryProducts[0].products); currentCp.products!.addAll(moreCategoryProducts[0].products!);
} else { } else {
_productCurrentPage = 0; _productCurrentPage = 0;
displayProductByCategoryClickIndicator = displayProductByCategoryClickIndicator =
@@ -1844,7 +1844,7 @@ class ShopState extends State<Shop>
} else { } else {
DateTime now = DateTime.now(); DateTime now = DateTime.now();
if (!(now.hour >= business.todayOpen && if (!(now.hour >= business.todayOpen &&
now.hour <= business.todayClose)) { now.hour <= business.todayClose!)) {
showDialog( showDialog(
context: context, context: context,
builder: (BuildContext context) { builder: (BuildContext context) {
@@ -1876,7 +1876,7 @@ class ShopState extends State<Shop>
Container( Container(
child: Text( child: Text(
S.of(context).book_now_delivery_later_token( S.of(context).book_now_delivery_later_token(
business.todayOpen), business.todayOpen!),
style: TextStyle( style: TextStyle(
color: Colors.black38, color: Colors.black38,
), ),

View File

@@ -270,7 +270,7 @@ class ShoppingCartBarState extends State<ShoppingCartBar> {
children: <Widget>[ children: <Widget>[
Container( Container(
child: Text( child: Text(
item.name, item.name!,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
color: Colors.black87, color: Colors.black87,
@@ -281,7 +281,7 @@ class ShoppingCartBarState extends State<ShoppingCartBar> {
), ),
Container( Container(
child: Text( child: Text(
item.description, item.description!,
style: TextStyle( style: TextStyle(
color: Colors.black38, color: Colors.black38,
fontSize: 10.0 fontSize: 10.0

View File

@@ -101,6 +101,29 @@ def insert_bang(line, col0, name, kind):
return None return None
return None return None
def insert_arg_bang(line, col0):
"""在参数值末尾插 '!'(仅限简单值:标识符/成员/调用/下标)。"""
depth=0; end=None
for i in range(col0, len(line)):
ch=line[i]
if ch in '([{': depth+=1
elif ch in ')]}':
if depth==0: end=i; break
depth-=1
elif ch==',' and depth==0: end=i; break
if end is None: end=len(line)
# 值的实际末尾(跳过空白)
j=end-1
while j>=col0 and line[j] in ' \t': j-=1
if j<col0: return None
if line[j]=='!': return None
val=line[col0:j+1].strip()
if not val: return None
if val[0] in '0123456789"\'': return None # 字面量跳过
if val in ('true','false','null'): return None
if not re.fullmatch(r'[\w.\[\]()]+', val): return None # 含运算符等跳过
return line[:j+1]+'!'+line[j+1:]
def make_field_nullable(lines, name): def make_field_nullable(lines, name):
"""找字段声明 'Type name;' 并在类型后加 '?'。返回 (行索引, 新行) 或 (None,None)。""" """找字段声明 'Type name;' 并在类型后加 '?'。返回 (行索引, 新行) 或 (None,None)。"""
pat = re.compile(r'^(\s+(?:final\s+|const\s+)?(?:static\s+)?)(.+)\s+'+re.escape(name)+r';\s*$') pat = re.compile(r'^(\s+(?:final\s+|const\s+)?(?:static\s+)?)(.+)\s+'+re.escape(name)+r';\s*$')
@@ -170,6 +193,8 @@ def apply_round(errs):
new=insert_nullable_before_name(old, pname, col-1) new=insert_nullable_before_name(old, pname, col-1)
elif rule in ('not_initialized_non_nullable_instance_field','not_initialized_non_nullable_variable'): elif rule in ('not_initialized_non_nullable_instance_field','not_initialized_non_nullable_variable'):
new=insert_late(old) new=insert_late(old)
elif rule in ('argument_type_not_assignable','invalid_assignment'):
new=insert_arg_bang(old, col-1)
if new and new!=old: if new and new!=old:
L[line-1]=new; changed+=1 L[line-1]=new; changed+=1
flush() flush()