update cargo type input for carton
This commit is contained in:
@@ -19,8 +19,8 @@ Future<void> main() async {
|
|||||||
Config(
|
Config(
|
||||||
flavor: Flavor.DEV,
|
flavor: Flavor.DEV,
|
||||||
color: Colors.blue,
|
color: Colors.blue,
|
||||||
apiURL: "http://192.168.100.150:9090",
|
// apiURL: "http://192.168.100.150:9090",
|
||||||
// apiURL: "https://asia-northeast1-fcs-dev1.cloudfunctions.net/API13",
|
apiURL: "https://asia-northeast1-fcs-dev1.cloudfunctions.net/API13",
|
||||||
level: Level.ALL);
|
level: Level.ALL);
|
||||||
runApp(App(title: "FCS - Dev"));
|
runApp(App(title: "FCS - Dev"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ import 'surcharge_item_addition.dart';
|
|||||||
|
|
||||||
typedef OnPrevious = Function(List<CargoType> cargoTypes,
|
typedef OnPrevious = Function(List<CargoType> cargoTypes,
|
||||||
List<CargoType> customDuties, double totalWeight);
|
List<CargoType> customDuties, double totalWeight);
|
||||||
typedef OnContinue = Function(
|
typedef OnContinue = Function(List<CargoType> cargoTypes,
|
||||||
List<CargoType> cargoTypes, List<CargoType> customDuties);
|
List<CargoType> customDuties, double totalWeight);
|
||||||
|
|
||||||
class CargoWidget extends StatefulWidget {
|
class CargoWidget extends StatefulWidget {
|
||||||
final User sender;
|
final User sender;
|
||||||
@@ -408,7 +408,8 @@ class _CargoWidgetState extends State<CargoWidget> {
|
|||||||
context, "Error", "Please add the right cargo type weight");
|
context, "Error", "Please add the right cargo type weight");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
widget.onContinue!(_cargoTypes, _surchareItems);
|
widget.onContinue!(
|
||||||
|
_cargoTypes, _surchareItems, double.tryParse(totalCtl.text) ?? 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -255,8 +255,9 @@ class _CartonPackageEditorState extends State<CartonPackageEditor> {
|
|||||||
cargoTypes: _cargoTypes,
|
cargoTypes: _cargoTypes,
|
||||||
surchargeItems: _surchareItems,
|
surchargeItems: _surchareItems,
|
||||||
totalWeight: _totalWeight,
|
totalWeight: _totalWeight,
|
||||||
onContinue: (cargoTypes, customDuties) {
|
onContinue: (cargoTypes, customDuties, totalWeight) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
_totalWeight = totalWeight;
|
||||||
_cargoTypes = List.from(cargoTypes);
|
_cargoTypes = List.from(cargoTypes);
|
||||||
_surchareItems = List.from(customDuties);
|
_surchareItems = List.from(customDuties);
|
||||||
currentStep += 1;
|
currentStep += 1;
|
||||||
|
|||||||
@@ -190,8 +190,9 @@ class _CartonPackageFormState extends State<CartonPackageForm> {
|
|||||||
cargoTypes: _cargoTypes,
|
cargoTypes: _cargoTypes,
|
||||||
surchargeItems: _surchareItems,
|
surchargeItems: _surchareItems,
|
||||||
totalWeight: _totalWeight,
|
totalWeight: _totalWeight,
|
||||||
onContinue: (cargoTypes, customDuties) {
|
onContinue: (cargoTypes, customDuties, totalWeight) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
_totalWeight = totalWeight;
|
||||||
_cargoTypes = List.from(cargoTypes);
|
_cargoTypes = List.from(cargoTypes);
|
||||||
_surchareItems = List.from(customDuties);
|
_surchareItems = List.from(customDuties);
|
||||||
currentStep += 1;
|
currentStep += 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user