fix
This commit is contained in:
@@ -16,10 +16,12 @@ class Rate {
|
||||
|
||||
DiscountByWeight getDiscountByWeight(double weight) {
|
||||
discountByWeights.sort((d1, d2) => d2.weight.compareTo(d1.weight));
|
||||
return discountByWeights.firstWhere((e) => e.weight < weight);
|
||||
return discountByWeights.firstWhere((e) => e.weight < weight,
|
||||
orElse: () => DiscountByWeight());
|
||||
}
|
||||
|
||||
CargoType get defaultCargoType => 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