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

@@ -1,14 +1,16 @@
import 'package:fcs/domain/entities/carton.dart';
import 'package:fcs/helpers/theme.dart';
import 'package:fcs/pages/main/util.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:intl/intl.dart';
import 'delivery_info.dart';
class DeliveryListRow extends StatefulWidget {
final Carton box;
const DeliveryListRow({this.box});
const DeliveryListRow({Key key,this.box}):super(key:key);
@override
_DeliveryListRowState createState() => _DeliveryListRowState();
@@ -27,15 +29,15 @@ class _DeliveryListRowState extends State<DeliveryListRow> {
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.only(left: 15, right: 15),
child: InkWell(
onTap: () {
Navigator.push(
context,
CupertinoPageRoute(builder: (context) => DeliveryInfo(box: _box)),
);
},
return InkWell(
onTap: () {
Navigator.push(
context,
CupertinoPageRoute(builder: (context) => DeliveryInfo(box: _box)),
);
},
child: Container(
padding: EdgeInsets.only(left: 15, right: 15),
child: Row(
children: <Widget>[
Expanded(
@@ -43,6 +45,14 @@ class _DeliveryListRowState extends State<DeliveryListRow> {
padding: const EdgeInsets.symmetric(vertical: 16.0),
child: new Row(
children: <Widget>[
Container(
padding: EdgeInsets.only(left: 5, right: 10),
child: Icon(
MaterialCommunityIcons.truck_fast,
color: primaryColor,
size: 30,
),
),
new Expanded(
child: new Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -50,9 +60,7 @@ class _DeliveryListRowState extends State<DeliveryListRow> {
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
_box.packageNumber == null
? ''
: _box.packageNumber,
_box.cartonNumber ?? "",
style: new TextStyle(
fontSize: 15.0, color: Colors.black),
),
@@ -60,7 +68,7 @@ class _DeliveryListRowState extends State<DeliveryListRow> {
Padding(
padding: const EdgeInsets.only(left: 10.0, top: 10),
child: new Text(
dateFormat.format(_box.arrivedDate),
_box.userName ?? "",
style: new TextStyle(
fontSize: 15.0, color: Colors.grey),
),
@@ -83,14 +91,7 @@ class _DeliveryListRowState extends State<DeliveryListRow> {
child: Row(
children: <Widget>[
new Text(
_box.weight == null
? ''
: _box.weight.toString() + 'lb - ',
style:
new TextStyle(fontSize: 15.0, color: Colors.grey),
),
new Text(
_box.price == null ? "" : "\$ " + _box.price.toString(),
"${_box.actualWeight?.toString() ?? ''} lb",
style:
new TextStyle(fontSize: 15.0, color: Colors.grey),
),