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), date: DateTime(2020, 5, 6),
address: '154-19 64th Ave.\nFlushing, NY 11367', address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 5000, handlingFee: 5000,
isCourier: true,
radioIndex: 4,
cargoTypes: [ cargoTypes: [
Cargo(type: 'General Cargo', weight: 25), Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20), Cargo(type: 'Medicine', weight: 20),

View File

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