add two decimal and add confirm dialog if press back button

This commit is contained in:
Thinzar Win
2020-12-04 17:28:21 +06:30
parent d5a3c4410e
commit 0b339e9dc1
32 changed files with 169 additions and 54 deletions

View File

@@ -138,10 +138,12 @@ class _ShipmentRatesState extends State<ShipmentRates> {
color: Colors.grey,
),
_row("Free delivery within Yangon \nfor shipments over",
"${rate.freeDeliveryWeight}", "pounds"),
_row("Delivery fees", "\$ ${rate.deliveryFee}",
"below ${rate.freeDeliveryWeight} pounds"),
_row("Volumetric Ratio", "${rate.volumetricRatio}",
"${rate.freeDeliveryWeight.toStringAsFixed(2)}", "pounds"),
_row("Delivery fees", "\$ ${rate.deliveryFee.toStringAsFixed(2)}",
"below ${rate.freeDeliveryWeight.toStringAsFixed(2)} pounds"),
_row(
"Volumetric Ratio",
"${rate.volumetricRatio.toStringAsFixed(2)}",
"in3 per pound"),
Divider(
color: Colors.grey,
@@ -179,7 +181,8 @@ class _ShipmentRatesState extends State<ShipmentRates> {
List<Widget> getCargoWidget(List<CargoType> cargos) {
return cargos.map((cargo) {
return Container(
child: _row(cargo.name, "\$ " + cargo.rate.toString(), 'per pound'),
child: _row(
cargo.name, "\$ " + cargo.rate.toStringAsFixed(2), 'per pound'),
);
}).toList();
}
@@ -187,7 +190,7 @@ class _ShipmentRatesState extends State<ShipmentRates> {
List<Widget> getCustonWidget(List<CustomDuty> customs) {
return customs.map((c) {
return Container(
child: _row(c.productType, "\$ " + c.fee.toString(), ''),
child: _row(c.productType, "\$ " + c.fee.toStringAsFixed(2), ''),
);
}).toList();
}
@@ -197,7 +200,7 @@ class _ShipmentRatesState extends State<ShipmentRates> {
return discounts.map((d) {
return Container(
child: _row("${d.weight.toStringAsFixed(2)} lb",
"\$ " + d.discount.toString(), ''),
"\$ " + d.discount.toStringAsFixed(2), ''),
);
}).toList();
}