add shipments

This commit is contained in:
Sai Naw Wun
2020-10-19 05:13:49 +06:30
parent 4f8bde40b0
commit c619ae3f22
57 changed files with 1886 additions and 724 deletions

View File

@@ -9,14 +9,19 @@ import 'shipment_info.dart';
class ShipmentListRow extends StatelessWidget {
final Shipment pickUp;
const ShipmentListRow({Key key, this.pickUp}) : super(key: key);
final bool isCustomer;
const ShipmentListRow({Key key, this.pickUp, this.isCustomer})
: super(key: key);
@override
Widget build(BuildContext context) {
return InkWell(
onTap: () {
Navigator.of(context).push(CupertinoPageRoute(
builder: (context) => ShipmentInfo(shipment: pickUp)));
builder: (context) => ShipmentInfo(
shipment: pickUp,
isCustomer: isCustomer,
)));
},
child: Container(
padding: EdgeInsets.only(left: 15, right: 15),
@@ -46,7 +51,7 @@ class ShipmentListRow extends StatelessWidget {
),
),
Padding(
padding: const EdgeInsets.only(left: 10.0, top: 10),
padding: const EdgeInsets.only(left: 10.0, top: 3),
child: new Text(
pickUp.id == null
? ''
@@ -66,29 +71,25 @@ class ShipmentListRow extends StatelessWidget {
children: <Widget>[
Padding(
padding: const EdgeInsets.all(0),
child: getStatus(pickUp.currentStatus),
),
Padding(
padding: const EdgeInsets.only(left: 8.0, top: 5, bottom: 5),
child: Row(
children: <Widget>[
new Text(
pickUp.weight == null
? ''
: pickUp.weight.toString() + 'lb - ',
style:
new TextStyle(fontSize: 15.0, color: Colors.grey),
),
new Text(
pickUp.numberOfPackage == null
? ""
: pickUp.numberOfPackage.toString() + ' packages',
style:
new TextStyle(fontSize: 15.0, color: Colors.grey),
),
],
),
child: getStatus(pickUp.status),
),
// Padding(
// padding: const EdgeInsets.only(left: 8.0, top: 5, bottom: 5),
// child: Row(
// children: <Widget>[
// new Text(
// "(${pickUp.totalWeight ?? "0"}) lb ",
// style:
// new TextStyle(fontSize: 15.0, color: Colors.grey),
// ),
// new Text(
// "(${pickUp.totalCount ?? "0"}) cartons ",
// style:
// new TextStyle(fontSize: 15.0, color: Colors.grey),
// ),
// ],
// ),
// ),
],
)
],