update shipment

This commit is contained in:
Thinzar Win
2020-07-01 08:29:51 +06:30
parent b15e685f3a
commit 0aa864313f
2 changed files with 71 additions and 41 deletions

View File

@@ -74,8 +74,6 @@ class PickUpModel extends BaseModel {
date: DateTime(2020, 5, 6),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 5000,
isCourier: true,
radioIndex: 4,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),

View File

@@ -230,7 +230,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
MainModel mainModel = Provider.of<MainModel>(context);
var boxModel = Provider.of<BoxModel>(context);
// var shipmentModel = Provider.of<ShipmentModel>(context);
var shipmentModel = Provider.of<ShipmentModel>(context);
return LocalProgress(
inAsyncCall: _isLoading,
@@ -321,48 +321,80 @@ class _PickUpEditorState extends State<PickUpEditor> {
phoneNumber: '+1 (292)215-2247'),
),
)
: ExpansionTile(
title: Text(
'Package Information',
style: TextStyle(
color: primaryColor,
fontWeight: FontWeight.bold),
),
children: <Widget>[
Column(
children: getBoxList(context, boxModel.boxes),
),
Container(
padding: EdgeInsets.only(
top: 20, bottom: 15, right: 15),
child: Align(
alignment: Alignment.bottomRight,
child: Container(
width: 120,
height: 40,
child: FloatingActionButton.extended(
materialTapTargetSize:
MaterialTapTargetSize.shrinkWrap,
icon: Icon(Icons.add),
onPressed: () {
Navigator.push(
context,
BottomUpPageRoute(PickupBoxEditor()),
);
},
label: Text(
'Add Package',
style: TextStyle(fontSize: 12),
: _currVal == 4
? Container(
child: Column(
children: <Widget>[
ShippingAddressRow(
shippingAddress:
shipmentModel.shippingAddresses[1]),
Container(
padding: EdgeInsets.only(
top: 20, bottom: 15, right: 15),
child: Align(
alignment: Alignment.bottomRight,
child: Container(
width: 120,
height: 40,
child: FloatingActionButton.extended(
materialTapTargetSize:
MaterialTapTargetSize.shrinkWrap,
onPressed: () {},
icon: Icon(Icons.add),
label: Text(
'Select\nAddress',
style: TextStyle(fontSize: 12),
),
backgroundColor: primaryColor,
),
),
),
),
],
))
: ExpansionTile(
title: Text(
'Package Information',
style: TextStyle(
color: primaryColor,
fontWeight: FontWeight.bold),
),
children: <Widget>[
Column(
children: getBoxList(context, boxModel.boxes),
),
Container(
padding: EdgeInsets.only(
top: 20, bottom: 15, right: 15),
child: Align(
alignment: Alignment.bottomRight,
child: Container(
width: 120,
height: 40,
child: FloatingActionButton.extended(
materialTapTargetSize:
MaterialTapTargetSize.shrinkWrap,
icon: Icon(Icons.add),
onPressed: () {
Navigator.push(
context,
BottomUpPageRoute(
PickupBoxEditor()),
);
},
label: Text(
'Add Package',
style: TextStyle(fontSize: 12),
),
backgroundColor: primaryColor,
),
),
backgroundColor: primaryColor,
),
),
),
SizedBox(height: 10.0),
],
),
SizedBox(height: 10.0),
],
),
_currVal == 3
_currVal == 3 || _currVal == 4
? Container()
: ExpansionTile(
title: Text(