phase3: mobile/shop clean (categoryDescHeight double, FooterBuilder LoadStatus?, nullable fixes); edit_address .buttonColor->colorScheme.primary. 131->118
This commit is contained in:
@@ -430,7 +430,7 @@ class DesktopEditAddressState extends State<DesktopEditAddress> {
|
|||||||
padding: EdgeInsets.all(8.0),
|
padding: EdgeInsets.all(8.0),
|
||||||
color: Theme
|
color: Theme
|
||||||
.of(context)
|
.of(context)
|
||||||
.buttonColor,
|
.colorScheme.primary,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ class MobileEditAddressState extends State<MobileEditAddress> {
|
|||||||
padding: EdgeInsets.all(8.0),
|
padding: EdgeInsets.all(8.0),
|
||||||
color: Theme
|
color: Theme
|
||||||
.of(context)
|
.of(context)
|
||||||
.buttonColor,
|
.colorScheme.primary,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class ShopState extends State<Shop>
|
|||||||
int _productCurrentPage = 1;
|
int _productCurrentPage = 1;
|
||||||
|
|
||||||
static const num _categoryHeight = 50.0;
|
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;
|
static const num _productHeight = Constants.PRODUCT_ITEM_HEIGHT_H;
|
||||||
|
|
||||||
int _categoryIndex = 0;
|
int _categoryIndex = 0;
|
||||||
@@ -409,7 +409,7 @@ class ShopState extends State<Shop>
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
title: Text(
|
title: Text(
|
||||||
_business != null ? _business.name : '',
|
_business != null ? _business.name! : '',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
@@ -725,7 +725,7 @@ class ShopState extends State<Shop>
|
|||||||
enablePullDown: true,
|
enablePullDown: true,
|
||||||
header: WaterDropHeader(),
|
header: WaterDropHeader(),
|
||||||
footer: CustomFooter(
|
footer: CustomFooter(
|
||||||
builder: (BuildContext context, LoadStatus mode) {
|
builder: (BuildContext context, LoadStatus? mode) {
|
||||||
Widget footer;
|
Widget footer;
|
||||||
if (mode == LoadStatus.idle) {
|
if (mode == LoadStatus.idle) {
|
||||||
footer = Text(S.of(context).pull_up_to_load_more);
|
footer = Text(S.of(context).pull_up_to_load_more);
|
||||||
@@ -781,7 +781,7 @@ class ShopState extends State<Shop>
|
|||||||
addressColumn.children.add(new Text(
|
addressColumn.children.add(new Text(
|
||||||
_business.address!.city! +
|
_business.address!.city! +
|
||||||
', ' +
|
', ' +
|
||||||
_business.address!.state +
|
_business.address!.state! +
|
||||||
', ' +
|
', ' +
|
||||||
_business.address!.zip!,
|
_business.address!.zip!,
|
||||||
style: new TextStyle(fontSize: 13.0, color: const Color(0xFFEEEEEE)),
|
style: new TextStyle(fontSize: 13.0, color: const Color(0xFFEEEEEE)),
|
||||||
@@ -801,7 +801,7 @@ class ShopState extends State<Shop>
|
|||||||
));
|
));
|
||||||
distanceRow.children.add(new Text(
|
distanceRow.children.add(new Text(
|
||||||
_business.distanceInfo!.distance != null
|
_business.distanceInfo!.distance != null
|
||||||
? _business.distanceInfo!.distance!.text
|
? _business.distanceInfo!.distance!.text!
|
||||||
: '***' + ' / ',
|
: '***' + ' / ',
|
||||||
style: new TextStyle(color: const Color(0xFFEEEEEE), fontSize: 13.0),
|
style: new TextStyle(color: const Color(0xFFEEEEEE), fontSize: 13.0),
|
||||||
));
|
));
|
||||||
@@ -912,7 +912,7 @@ class ShopState extends State<Shop>
|
|||||||
new Text(
|
new Text(
|
||||||
_business.openingTime![0].openTime! +
|
_business.openingTime![0].openTime! +
|
||||||
':00 - ' +
|
':00 - ' +
|
||||||
_business.openingTime![0].closeTime +
|
_business.openingTime![0].closeTime! +
|
||||||
':00',
|
':00',
|
||||||
style: new TextStyle(
|
style: new TextStyle(
|
||||||
fontSize: 13.0, color: const Color(0xFFEEEEEE)),
|
fontSize: 13.0, color: const Color(0xFFEEEEEE)),
|
||||||
@@ -956,7 +956,7 @@ class ShopState extends State<Shop>
|
|||||||
width: mediaQuery.size.width - 30.0,
|
width: mediaQuery.size.width - 30.0,
|
||||||
padding: EdgeInsets.only(right: 10.0, bottom: 10.0),
|
padding: EdgeInsets.only(right: 10.0, bottom: 10.0),
|
||||||
child: new Text(
|
child: new Text(
|
||||||
_business.bulletin!.isEmpty ? '' : _business.bulletin,
|
_business.bulletin!.isEmpty ? '' : _business.bulletin!,
|
||||||
softWrap: true,
|
softWrap: true,
|
||||||
style: new TextStyle(
|
style: new TextStyle(
|
||||||
fontSize: 12.0, color: const Color(0xFFDDDDDD)),
|
fontSize: 12.0, color: const Color(0xFFDDDDDD)),
|
||||||
@@ -1137,7 +1137,7 @@ class ShopState extends State<Shop>
|
|||||||
CategoryProducts cp = _categoryProducts[i];
|
CategoryProducts cp = _categoryProducts[i];
|
||||||
int qtyInCategory = 0;
|
int qtyInCategory = 0;
|
||||||
CartInfo cartInfo =
|
CartInfo cartInfo =
|
||||||
Utils.getCartInfoByBusiness(store.state.cartInfos, _business);
|
Utils.getCartInfoByBusiness(store.state.cartInfos, _business)!;
|
||||||
if (cartInfo != null &&
|
if (cartInfo != null &&
|
||||||
cartInfo.businessInfo!.id == _business.id &&
|
cartInfo.businessInfo!.id == _business.id &&
|
||||||
cartInfo.productList != null) {
|
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) {
|
for (CategoryProducts cp in _categoryProducts) {
|
||||||
if (cp.id == cid) {
|
if (cp.id == cid) {
|
||||||
return cp;
|
return cp;
|
||||||
@@ -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(
|
||||||
@@ -1629,7 +1629,7 @@ class ShopState extends State<Shop>
|
|||||||
S.of(context).pull_up_to_load_more;
|
S.of(context).pull_up_to_load_more;
|
||||||
}
|
}
|
||||||
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 {
|
||||||
@@ -1843,7 +1843,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,
|
||||||
|
|||||||
Reference in New Issue
Block a user