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

@@ -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,