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

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