add packages

This commit is contained in:
Sai Naw Wun
2020-06-03 00:42:31 +06:30
parent d41d48b405
commit c84e1beb9d
22 changed files with 439 additions and 265 deletions

View File

@@ -45,11 +45,13 @@ class _PickUpEditorState extends State<PickUpEditor> {
PickUp _pickUp;
bool _isLoading = false;
var now = new DateTime.now();
bool isNew;
@override
void initState() {
super.initState();
if (widget.pickUp != null) {
isNew = false;
_pickUp = widget.pickUp;
_addressEditingController.text = _pickUp.address;
_fromTimeEditingController.text = _pickUp.fromTime;
@@ -63,6 +65,8 @@ class _PickUpEditorState extends State<PickUpEditor> {
_recipientPhoneEditingController.text = mainModel.recipient.phoneNumber;
_recipientAddressEditingController.text =
mainModel.recipient.shippingAddress;
} else {
isNew = true;
}
}
@@ -190,7 +194,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
EdgeInsets.symmetric(vertical: 10.0, horizontal: 0.0),
icon: Icon(
Icons.date_range,
color: Colors.grey,
color: primaryColor,
)),
validator: (value) {
if (value.isEmpty) {
@@ -224,18 +228,20 @@ class _PickUpEditorState extends State<PickUpEditor> {
child: ListView(children: <Widget>[
Center(child: nameWidget(mainModel.customer.name)),
Center(child: nameWidget(mainModel.customer.phoneNumber)),
Center(
child: Padding(
padding: const EdgeInsets.only(left: 10.0, top: 8),
child: Text(
'#P200304',
style: TextStyle(
color: Colors.black87,
fontSize: 14,
fontWeight: FontWeight.bold),
),
),
),
isNew
? Container()
: Center(
child: Padding(
padding: const EdgeInsets.only(left: 10.0, top: 8),
child: Text(
'#P200304',
style: TextStyle(
color: Colors.black87,
fontSize: 14,
fontWeight: FontWeight.bold),
),
),
),
ExpansionTile(
title: Text('Pickup Location / Time'),
children: <Widget>[