update carton and cargo type

This commit is contained in:
tzw
2025-03-12 17:49:27 +06:30
parent 05e912ea68
commit e208734dfa
32 changed files with 1141 additions and 462 deletions

View File

@@ -11,13 +11,13 @@ import 'model/shipment_rate_model.dart';
class CustomList extends StatefulWidget {
final bool? selected;
const CustomList({Key? key, this.selected}) : super(key: key);
const CustomList({super.key, this.selected});
@override
_CustomListState createState() => _CustomListState();
}
class _CustomListState extends State<CustomList> {
bool _isLoading = false;
bool isLoading = false;
bool _selected = false;
@override
@@ -38,7 +38,7 @@ class _CustomListState extends State<CustomList> {
var shipmentRateModel = Provider.of<ShipmentRateModel>(context);
return LocalProgress(
inAsyncCall: _isLoading,
inAsyncCall: isLoading,
child: Scaffold(
appBar: LocalAppBar(labelKey: 'rate.custom_duty.title'),
floatingActionButton: FloatingActionButton.extended(
@@ -49,7 +49,7 @@ class _CustomListState extends State<CustomList> {
icon: Icon(Icons.add, color: Colors.white),
backgroundColor: primaryColor,
label:
LocalText(context, 'rate.custom_duty', color: Colors.white)),
LocalText(context, 'rate.custom_new', color: Colors.white)),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: ListView.separated(
@@ -70,13 +70,11 @@ class _CustomListState extends State<CustomList> {
child: Container(
child: _row(
custom.name ?? "",
"Custom Fee \$ " +
custom.customDutyFee.toStringAsFixed(2),
"Custom Fee \$ ${custom.customDutyFee.toStringAsFixed(2)}",
// ignore: unnecessary_null_comparison
custom.rate == null
? ""
: "Shipment rate \$ " +
custom.rate.toStringAsFixed(2)),
: "Shipment rate \$ ${custom.rate.toStringAsFixed(2)}"),
),
);
}),
@@ -97,7 +95,7 @@ class _CustomListState extends State<CustomList> {
Padding(
padding: const EdgeInsets.only(bottom: 3.0),
child: Text(
'$fee',
fee,
style: TextStyle(color: primaryColor, fontSize: 14),
),
),
@@ -106,7 +104,7 @@ class _CustomListState extends State<CustomList> {
: Padding(
padding: const EdgeInsets.only(top: 3.0),
child: Text(
"$shipmentRate",
shipmentRate,
style: TextStyle(color: Colors.grey, fontSize: 14),
),
)