check null safety
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user