check null safety
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user