update carton

This commit is contained in:
Thinzar Win
2021-01-11 19:35:26 +06:30
parent 8a813023f4
commit db07e01f85
19 changed files with 211 additions and 137 deletions

View File

@@ -4,6 +4,7 @@ import 'package:fcs/domain/vo/delivery_address.dart';
import 'package:fcs/helpers/theme.dart';
import 'package:fcs/pages/carton/cargo_type_editor.dart';
import 'package:fcs/pages/delivery_address/model/delivery_address_model.dart';
import 'package:fcs/pages/main/model/main_model.dart';
import 'package:fcs/pages/rates/model/shipment_rate_model.dart';
import 'package:fcs/pages/widgets/defalut_delivery_address.dart';
import 'package:fcs/pages/widgets/delivery_address_selection.dart';
@@ -81,7 +82,8 @@ class _ShipmentBoxEditorState extends State<ShipmentBoxEditor> {
@override
Widget build(BuildContext context) {
var deliveryAddressModel = Provider.of<DeliveryAddressModel>(context);
var mainModel = Provider.of<MainModel>(context);
final shipmentWeightBox = DisplayText(
labelTextKey: "shipment.box.shipment.weight",
text: shipmentWeight == null ? "" : shipmentWeight.toStringAsFixed(0),
@@ -192,8 +194,7 @@ class _ShipmentBoxEditorState extends State<ShipmentBoxEditor> {
CupertinoPageRoute(
builder: (context) => DeliveryAddressSelection(
deliveryAddress: _box.deliveryAddress,
deliveryAddresses:
deliveryAddressModel.deliveryAddresses)),
user: mainModel.user)),
);
if (d == null) return;
setState(() {

View File

@@ -91,7 +91,7 @@ class _ShipmentEditorState extends State<ShipmentEditor> {
bool isCourierPickup = _selectedShipmentType == shipment_courier_pickup;
bool isLocalDropoff = _selectedShipmentType == shipment_local_dropoff;
bool isCourierDropoff = _selectedShipmentType == shipment_courier_dropoff;
var deliveryAddressModel = Provider.of<DeliveryAddressModel>(context);
var deliveryAddressModel = Provider.of<DeliveryAddressModel>(context);
final fromTimeBox = InputTime(
labelTextKey: 'shipment.from',
iconData: Icons.timer,
@@ -129,9 +129,8 @@ class _ShipmentEditorState extends State<ShipmentEditor> {
context,
CupertinoPageRoute(
builder: (context) => DeliveryAddressSelection(
deliveryAddress: _shipment.pickupAddress,
deliveryAddresses: deliveryAddressModel.deliveryAddresses,
)),
deliveryAddress: _shipment.pickupAddress,
user: mainModel.user)),
);
if (address == null) return;
setState(() {