move bill to to cartion size widget

This commit is contained in:
tzw
2024-02-09 12:16:39 +06:30
parent b2603c02ce
commit 4a9c04ef1e
5 changed files with 100 additions and 88 deletions

View File

@@ -26,9 +26,12 @@ import 'package_selection_widget.dart';
class CartonEditorForPackage extends StatefulWidget {
final User sender;
final User consignee;
final String billToValue;
const CartonEditorForPackage(
{Key? key, required this.sender, required this.consignee, required this.billToValue})
{Key? key,
required this.sender,
required this.consignee,
})
: super(key: key);
@override
@@ -54,6 +57,8 @@ class _CartonEditorForPackageState extends State<CartonEditorForPackage> {
double _height = 0;
String _selectedDeliveryType = delivery_caton;
String _billToValue = billToSender;
FcsShipment? _shipment;
String _cartonSizeType = standardCarton;
CartonSize? _standardSize;
@@ -131,6 +136,7 @@ class _CartonEditorForPackageState extends State<CartonEditorForPackage> {
return Expanded(
child: CartonSizeWidget(
deliveryType: _selectedDeliveryType,
billType: _billToValue,
sender: widget.sender,
consignee: widget.consignee,
shipment: _shipment,
@@ -142,10 +148,11 @@ class _CartonEditorForPackageState extends State<CartonEditorForPackage> {
onPrevious: () {
Navigator.pop(context);
},
onContinue: (deliveryType, shipment, cartonSizeType,
onContinue: (deliveryType,billType ,shipment, cartonSizeType,
{standardSize, length, width, height}) {
setState(() {
_selectedDeliveryType = deliveryType;
_billToValue = billType;
_shipment = shipment;
_cartonSizeType = cartonSizeType;
_standardSize = standardSize;
@@ -205,7 +212,7 @@ class _CartonEditorForPackageState extends State<CartonEditorForPackage> {
child: CartonSubmit(
sender: widget.sender,
consingee: widget.consignee,
billToValue: widget.billToValue,
billToValue: _billToValue,
cartonSizeType: _cartonSizeType,
standardSize: _standardSize,
length: _length,