phase3(critical-path): home page chain null-safe
home.dart + desktop/mobile navigation, carousels, index content widgets, customers_logo, appbar_menu, navigation_drawer, MobileBottomNav, double_back. Fixes: Key? params, nullable State fields, Scrollbar thumbVisibility, ModalRoute.of()?, badges hide Badge, cartInfos local promotion.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
import 'package:badges/badges.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/material.dart' hide Badge;
|
||||
import '../../constants.dart';
|
||||
import '../../generated/l10n.dart';
|
||||
import '../../routes.dart';
|
||||
@@ -15,10 +15,11 @@ class MobileBottomNav extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (store.state.cartInfos != null && store.state.cartInfos.length > 0) {
|
||||
final cartInfos = store.state.cartInfos;
|
||||
if (cartInfos != null && cartInfos.length > 0) {
|
||||
count = 0;
|
||||
for (var i = 0; i < store.state.cartInfos.length; i++) {
|
||||
if (store.state.cartInfos[i].productList != null && store.state.cartInfos[i].productList.length > 0) {
|
||||
for (var i = 0; i < cartInfos.length; i++) {
|
||||
if (cartInfos[i].productList != null && cartInfos[i].productList!.length > 0) {
|
||||
count += 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user