phase3: mobile/shop clean (categoryDescHeight double, FooterBuilder LoadStatus?, nullable fixes); edit_address .buttonColor->colorScheme.primary. 131->118

This commit is contained in:
2026-07-31 15:09:29 +08:00
parent 5cb5ef6396
commit 3053246bb8
3 changed files with 14 additions and 14 deletions

View File

@@ -430,7 +430,7 @@ class DesktopEditAddressState extends State<DesktopEditAddress> {
padding: EdgeInsets.all(8.0),
color: Theme
.of(context)
.buttonColor,
.colorScheme.primary,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[

View File

@@ -406,7 +406,7 @@ class MobileEditAddressState extends State<MobileEditAddress> {
padding: EdgeInsets.all(8.0),
color: Theme
.of(context)
.buttonColor,
.colorScheme.primary,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[

View File

@@ -70,7 +70,7 @@ class ShopState extends State<Shop>
int _productCurrentPage = 1;
static const num _categoryHeight = 50.0;
static const num _categoryDescHeight = 50.0;
static const double _categoryDescHeight = 50.0;
static const num _productHeight = Constants.PRODUCT_ITEM_HEIGHT_H;
int _categoryIndex = 0;
@@ -409,7 +409,7 @@ class ShopState extends State<Shop>
),
],
title: Text(
_business != null ? _business.name : '',
_business != null ? _business.name! : '',
style: TextStyle(
color: Colors.white,
),
@@ -725,7 +725,7 @@ class ShopState extends State<Shop>
enablePullDown: true,
header: WaterDropHeader(),
footer: CustomFooter(
builder: (BuildContext context, LoadStatus mode) {
builder: (BuildContext context, LoadStatus? mode) {
Widget footer;
if (mode == LoadStatus.idle) {
footer = Text(S.of(context).pull_up_to_load_more);
@@ -781,7 +781,7 @@ class ShopState extends State<Shop>
addressColumn.children.add(new Text(
_business.address!.city! +
', ' +
_business.address!.state +
_business.address!.state! +
', ' +
_business.address!.zip!,
style: new TextStyle(fontSize: 13.0, color: const Color(0xFFEEEEEE)),
@@ -801,7 +801,7 @@ class ShopState extends State<Shop>
));
distanceRow.children.add(new Text(
_business.distanceInfo!.distance != null
? _business.distanceInfo!.distance!.text
? _business.distanceInfo!.distance!.text!
: '***' + ' / ',
style: new TextStyle(color: const Color(0xFFEEEEEE), fontSize: 13.0),
));
@@ -912,7 +912,7 @@ class ShopState extends State<Shop>
new Text(
_business.openingTime![0].openTime! +
':00 - ' +
_business.openingTime![0].closeTime +
_business.openingTime![0].closeTime! +
':00',
style: new TextStyle(
fontSize: 13.0, color: const Color(0xFFEEEEEE)),
@@ -956,7 +956,7 @@ class ShopState extends State<Shop>
width: mediaQuery.size.width - 30.0,
padding: EdgeInsets.only(right: 10.0, bottom: 10.0),
child: new Text(
_business.bulletin!.isEmpty ? '' : _business.bulletin,
_business.bulletin!.isEmpty ? '' : _business.bulletin!,
softWrap: true,
style: new TextStyle(
fontSize: 12.0, color: const Color(0xFFDDDDDD)),
@@ -1137,7 +1137,7 @@ class ShopState extends State<Shop>
CategoryProducts cp = _categoryProducts[i];
int qtyInCategory = 0;
CartInfo cartInfo =
Utils.getCartInfoByBusiness(store.state.cartInfos, _business);
Utils.getCartInfoByBusiness(store.state.cartInfos, _business)!;
if (cartInfo != null &&
cartInfo.businessInfo!.id == _business.id &&
cartInfo.productList != null) {
@@ -1245,7 +1245,7 @@ class ShopState extends State<Shop>
}
}
CategoryProducts getCategoryProductByCategoryId(int cid) {
CategoryProducts? getCategoryProductByCategoryId(int cid) {
for (CategoryProducts cp in _categoryProducts) {
if (cp.id == cid) {
return cp;
@@ -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(
@@ -1629,7 +1629,7 @@ class ShopState extends State<Shop>
S.of(context).pull_up_to_load_more;
}
CategoryProducts currentCp =
getCategoryProductByCategoryId(categoryId);
getCategoryProductByCategoryId(categoryId)!;
if (currentCp != null) {
currentCp.products!.addAll(moreCategoryProducts[0].products!);
} else {
@@ -1843,7 +1843,7 @@ class ShopState extends State<Shop>
});
} else {
DateTime now = DateTime.now();
if (!(now.hour >= business.todayOpen &&
if (!(now.hour >= business.todayOpen! &&
now.hour <= business.todayClose!)) {
showDialog(
context: context,