check null safety
This commit is contained in:
@@ -59,7 +59,7 @@ class _CargoTableState extends State<CargoTable> {
|
||||
}
|
||||
double total = 0;
|
||||
var rows = widget.cargoTypes!.map((c) {
|
||||
total += c.weight!;
|
||||
total += c.weight;
|
||||
return MyDataRow(
|
||||
onSelectChanged: (bool selected) async {},
|
||||
cells: [
|
||||
@@ -81,7 +81,7 @@ class _CargoTableState extends State<CargoTable> {
|
||||
),
|
||||
)),
|
||||
MyDataCell(
|
||||
Text(c.weight == null ? "0" : c.weight!.toStringAsFixed(2),
|
||||
Text(c.weight == null ? "0" : c.weight.toStringAsFixed(2),
|
||||
style: textStyle),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user