check null safety
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
import 'package:fcs/domain/entities/cargo_type.dart';
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/pages/main/util.dart';
|
||||
import 'package:fcs/pages/widgets/local_text.dart';
|
||||
import 'package:fcs/pages/widgets/my_data_table.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'cargo_type_editor.dart';
|
||||
import 'total_weight_edit.dart';
|
||||
|
||||
typedef OnAdd(CargoType cargoType);
|
||||
@@ -68,7 +66,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: [
|
||||
@@ -88,7 +86,7 @@ class _CargoTableState extends State<CargoTable> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Text(c.weight!.toStringAsFixed(2), style: textStyle),
|
||||
Text(c.weight.toStringAsFixed(2), style: textStyle),
|
||||
widget.onRemove == null
|
||||
? SizedBox(
|
||||
width: 50,
|
||||
|
||||
Reference in New Issue
Block a user