phase3: targeted local-var nullable (strict type) + nullfix cascade. 379->309
This commit is contained in:
@@ -136,7 +136,7 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
|
||||
),
|
||||
),
|
||||
);
|
||||
Map<String, dynamic> existing_web_svc;
|
||||
Map<String, dynamic>? existing_web_svc;
|
||||
if (selectedStore != null && (selectedStore['services'] as List).length > 0) {
|
||||
for (Map<String, dynamic>svc in (selectedStore['services'] as List)) {
|
||||
if (svc['code'] == Constants.WEB_MINISTORE_SERVICE) {
|
||||
@@ -188,8 +188,8 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
|
||||
Navigator.pushReplacement(context, MaterialPageRoute(
|
||||
builder: (BuildContext context) =>
|
||||
BuyService(group.id!, Constants.WEB_MINISTORE_SERVICE,
|
||||
domain: existing_web_svc['domain'],
|
||||
sid: existing_web_svc['store']['id'],
|
||||
domain: existing_web_svc!['domain'],
|
||||
sid: existing_web_svc!['store']['id'],
|
||||
),
|
||||
));
|
||||
},
|
||||
|
||||
@@ -350,7 +350,7 @@ class MobileMeState extends State<MobileMe> {
|
||||
controller: _listScrollController1,
|
||||
itemCount: 7,
|
||||
itemBuilder: (BuildContext context, int i) {
|
||||
Widget item;
|
||||
Widget? item;
|
||||
switch (i) {
|
||||
case 0:
|
||||
item = GestureDetector(
|
||||
|
||||
@@ -129,7 +129,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
|
||||
return ListView.builder(
|
||||
itemCount: orders != null && orders.length > 0 ? orders.length : 1,
|
||||
itemBuilder: (BuildContext context, int position) {
|
||||
Order order;
|
||||
Order? order;
|
||||
if (orders != null && orders.length > 0) {
|
||||
order = orders[position];
|
||||
}
|
||||
@@ -193,7 +193,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.push(context, MaterialPageRoute(
|
||||
builder: (BuildContext context) => OrderDetail(order.id!, fromOrders: true,),
|
||||
builder: (BuildContext context) => OrderDetail(order!.id!, fromOrders: true,),
|
||||
));
|
||||
},
|
||||
),
|
||||
@@ -208,7 +208,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
|
||||
S.of(context).comment,
|
||||
),
|
||||
onPressed: () {
|
||||
Routes.router.navigateTo(context, '/new-comment/${order.id}');
|
||||
Routes.router.navigateTo(context, '/new-comment/${order!.id}');
|
||||
},
|
||||
),
|
||||
),
|
||||
@@ -237,7 +237,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
|
||||
backgroundColor: Colors.redAccent,
|
||||
),
|
||||
onPressed: () {
|
||||
Routes.router.navigateTo(context, '/paynow/${order.id}');
|
||||
Routes.router.navigateTo(context, '/paynow/${order!.id}');
|
||||
},
|
||||
));
|
||||
} else {
|
||||
@@ -252,7 +252,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
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,
|
||||
),
|
||||
onPressed: () {
|
||||
Utils.orderAgain(context, order.cartInfo!);
|
||||
Utils.orderAgain(context, order!.cartInfo!);
|
||||
},
|
||||
));
|
||||
}
|
||||
@@ -329,7 +329,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(
|
||||
builder: (BuildContext context) => OrderDetail(order.id!, fromOrders: true,),
|
||||
builder: (BuildContext context) => OrderDetail(order!.id!, fromOrders: true,),
|
||||
));
|
||||
},
|
||||
),
|
||||
@@ -375,7 +375,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(
|
||||
builder: (BuildContext context) => OrderDetail(order.id!, fromOrders: true,),
|
||||
builder: (BuildContext context) => OrderDetail(order!.id!, fromOrders: true,),
|
||||
));
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user