add mix carton
This commit is contained in:
@@ -8,32 +8,20 @@ import 'package:intl/intl.dart';
|
||||
|
||||
import 'delivery_info.dart';
|
||||
|
||||
class DeliveryListRow extends StatefulWidget {
|
||||
class DeliveryListRow extends StatelessWidget {
|
||||
final Carton box;
|
||||
const DeliveryListRow({Key key,this.box}):super(key:key);
|
||||
DeliveryListRow({Key key, this.box}) : super(key: key);
|
||||
|
||||
@override
|
||||
_DeliveryListRowState createState() => _DeliveryListRowState();
|
||||
}
|
||||
|
||||
class _DeliveryListRowState extends State<DeliveryListRow> {
|
||||
final double dotSize = 15.0;
|
||||
Carton _box = new Carton();
|
||||
final DateFormat dateFormat = new DateFormat("dd MMM yyyy");
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_box = widget.box;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
CupertinoPageRoute(builder: (context) => DeliveryInfo(box: _box)),
|
||||
CupertinoPageRoute(builder: (context) => DeliveryInfo(box: box)),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
@@ -42,7 +30,7 @@ class _DeliveryListRowState extends State<DeliveryListRow> {
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: new Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16.0),
|
||||
padding: const EdgeInsets.symmetric(vertical: 10.0),
|
||||
child: new Row(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
@@ -60,7 +48,7 @@ class _DeliveryListRowState extends State<DeliveryListRow> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: new Text(
|
||||
_box.cartonNumber ?? "",
|
||||
box.cartonNumber ?? "",
|
||||
style: new TextStyle(
|
||||
fontSize: 15.0, color: Colors.black),
|
||||
),
|
||||
@@ -68,7 +56,7 @@ class _DeliveryListRowState extends State<DeliveryListRow> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 10.0, top: 10),
|
||||
child: new Text(
|
||||
_box.userName ?? "",
|
||||
box.userName ?? "",
|
||||
style: new TextStyle(
|
||||
fontSize: 15.0, color: Colors.grey),
|
||||
),
|
||||
@@ -84,14 +72,14 @@ class _DeliveryListRowState extends State<DeliveryListRow> {
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(0),
|
||||
child: getStatus(_box.status == null ? "" : _box.status),
|
||||
child: getStatus(box.status == null ? "" : box.status),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, top: 5, bottom: 5),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
new Text(
|
||||
"${_box.actualWeight?.toString() ?? ''} lb",
|
||||
"${box.actualWeight?.toString() ?? ''} lb",
|
||||
style:
|
||||
new TextStyle(fontSize: 15.0, color: Colors.grey),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user