fix(runtime): 37 late fields with == null checks were wrongly migrated -> nullable. Fixes LateInitializationError crashes on page navigation (shop/checkout/comment/data pages)
This commit is contained in:
@@ -32,7 +32,7 @@ class Shop extends StatefulWidget {
|
||||
}
|
||||
|
||||
class ShopState extends State<Shop> {
|
||||
late Business _business;
|
||||
Business? _business;
|
||||
|
||||
PanelController panelController = PanelController();
|
||||
late SlidingUpPanel _slidUpShoppingCart;
|
||||
@@ -71,7 +71,7 @@ class ShopState extends State<Shop> {
|
||||
backdropEnabled: true,
|
||||
slideDirection: SlideDirection.DOWN,
|
||||
panel: ShoppingCartBar(
|
||||
business: _business,
|
||||
business: _business!,
|
||||
endKey: endKey,
|
||||
barAtBottom: true,
|
||||
hasPicture: true,
|
||||
@@ -119,14 +119,14 @@ class ShopState extends State<Shop> {
|
||||
onTap: () {
|
||||
Navigator.push(context,
|
||||
MaterialPageRoute(builder: (BuildContext context) {
|
||||
return ProductSearch(_business);
|
||||
return ProductSearch(_business!);
|
||||
}));
|
||||
},
|
||||
),
|
||||
],
|
||||
breadCrumbHeight: Constants.BREADCRUMB_HEIGHT,
|
||||
shoppingCart: ShoppingCartWidget(
|
||||
business: _business,
|
||||
business: _business!,
|
||||
onTap: () {
|
||||
if (panelController.isPanelClosed) {
|
||||
panelController.open();
|
||||
@@ -150,7 +150,7 @@ class ShopState extends State<Shop> {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ShopPromote(data),
|
||||
ShopBulletin(_business),
|
||||
ShopBulletin(_business!),
|
||||
ShopProducts(data),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user