merge
This commit is contained in:
@@ -36,7 +36,7 @@ class _CustomEditorState extends State<CustomEditor> {
|
||||
_productController.text = _custom.name??"";
|
||||
_feeController.text = _custom.customDutyFee.toStringAsFixed(2);
|
||||
_shipmentRateController.text =
|
||||
_custom.rate == null ? "" : _custom.rate.toStringAsFixed(2);
|
||||
_custom.rate == null ? "" : _custom.rate?.toStringAsFixed(2) ?? '';
|
||||
} else {
|
||||
_isNew = true;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,8 @@ class _CustomListState extends State<CustomList> {
|
||||
"Custom Fee \$ " + custom.customDutyFee.toStringAsFixed(2),
|
||||
custom.rate == null
|
||||
? ""
|
||||
: "Shipment rate \$ " + custom.rate.toStringAsFixed(2)),
|
||||
: "Shipment rate \$ " +
|
||||
custom.rate!.toStringAsFixed(2)),
|
||||
),
|
||||
);
|
||||
}),
|
||||
|
||||
@@ -62,11 +62,11 @@ class _ShipmentRatesCalState extends State<ShipmentRatesCal> {
|
||||
var amount = box.calAmount(rate);
|
||||
var shipmentWeight = box.getShipmentWeight(rate.volumetricRatio);
|
||||
var effectiveWeight =
|
||||
_cargoType.weight > shipmentWeight ? _cargoType.weight : shipmentWeight;
|
||||
_cargoType.weight! > shipmentWeight ? _cargoType.weight : shipmentWeight;
|
||||
|
||||
setState(() {
|
||||
_deliveryFee =
|
||||
effectiveWeight > rate.freeDeliveryWeight ? 0 : rate.deliveryFee;
|
||||
effectiveWeight! > rate.freeDeliveryWeight ? 0 : rate.deliveryFee;
|
||||
_amount = amount == null ? 0 : amount + _deliveryFee;
|
||||
_shipmentWeight = shipmentWeight.toDouble();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user