check null safety

This commit is contained in:
tzw
2021-09-10 16:33:52 +06:30
parent 3eacbef117
commit d8c86a512b
46 changed files with 275 additions and 304 deletions

View File

@@ -35,7 +35,7 @@ class CartonMixTable extends StatelessWidget {
? [Container()]
: cartons!.asMap().entries.map((p) {
return Container(
color: p.value.isChecked
color: (p.value.isChecked ?? false)
? Colors.grey.withOpacity(0.2)
: Colors.grey.shade50.withOpacity(0.2),
child: Container(
@@ -60,7 +60,7 @@ class CartonMixTable extends StatelessWidget {
}),
Expanded(
child: new Text(
p.value.cartonNumber,
p.value.cartonNumber ?? "",
style: textStyle,
)),
new Text(