null safety

This commit is contained in:
Phaung Phaung
2021-09-10 14:29:55 +06:30
parent 5a313d641e
commit d862049b45
22 changed files with 93 additions and 51 deletions

View File

@@ -1,5 +1,4 @@
import 'package:fcs/domain/entities/cargo_type.dart';
import 'package:fcs/domain/entities/custom_duty.dart';
import 'package:fcs/domain/entities/discount_by_weight.dart';
import 'package:fcs/domain/entities/rate.dart';
import 'package:fcs/helpers/theme.dart';
@@ -186,7 +185,7 @@ class _ShipmentRatesState extends State<ShipmentRates> {
return cargos.map((cargo) {
return Container(
child: _row(
cargo.name, "\$ " + cargo.rate.toStringAsFixed(2), 'per pound'),
cargo.name ?? '', "\$ " + cargo.rate!.toStringAsFixed(2), 'per pound'),
);
}).toList();
}
@@ -194,7 +193,7 @@ class _ShipmentRatesState extends State<ShipmentRates> {
List<Widget> getCustonWidget(List<CargoType> customs) {
return customs.map((c) {
return Container(
child: _row(c.name, "\$ " + c.customDutyFee.toStringAsFixed(2), ''),
child: _row(c.name ?? '', "\$ " + c.customDutyFee!.toStringAsFixed(2), ''),
);
}).toList();
}