update package selection and cartion selection

This commit is contained in:
tzw
2024-02-13 17:48:06 +06:30
parent 252be38912
commit f6fdef36b6
7 changed files with 127 additions and 19 deletions

View File

@@ -55,9 +55,9 @@ class _CartonInfoState extends State<CartonInfo> {
_init() async {
try {
_isLoading = true;
_carton.cartonType = carton_from_packages;
_carton.billTo = billToConsignee;
_carton.cartonSizeType = customCarton;
_carton.cartonType = carton_from_packages;
multiImgController.setImageUrls = _carton.photos;
_cargoTypes = _carton.cargoTypes.where((e) => !e.isCutomDuty).toList();
_surchareItems = _carton.cargoTypes.where((e) => e.isCutomDuty).toList();
@@ -77,7 +77,7 @@ class _CartonInfoState extends State<CartonInfo> {
if (mounted) {
setState(() {});
}
_carton.cartonType = "Carton for packages";
totalWeight =
_carton.cargoTypes.fold(0, (sum, value) => sum + value.weight);
totalSurchargeCount =
@@ -351,7 +351,7 @@ class _CartonInfoState extends State<CartonInfo> {
onPressed: _gotoEditor),
]),
body: Container(
padding: const EdgeInsets.only(left: 20,right: 20),
padding: const EdgeInsets.only(left: 20, right: 20),
child: ListView(children: <Widget>[
Row(children: [
Flexible(child: cartonTypeBox),