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

@@ -19,9 +19,7 @@ class Rate {
return discountByWeights.firstWhere((e) => e.weight < weight);
}
CargoType? get defaultCargoType => cargoTypes == null
? null
: cargoTypes.firstWhere((e) => e.name == "General");
CargoType get defaultCargoType => cargoTypes.firstWhere((e) => e.name == "General");
Rate(
{this.deliveryFee = 0,