add pickups
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import 'package:fcs/model/main_model.dart';
|
||||
import 'package:fcs/model/pickup_model.dart';
|
||||
import 'package:fcs/pages/util.dart';
|
||||
import 'package:fcs/vo/pickup.dart';
|
||||
import 'package:flutter_icons/flutter_icons.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:fcs/widget/localization/app_translations.dart';
|
||||
|
||||
@@ -56,6 +60,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
controller: _addressEditingController,
|
||||
cursorColor: primaryColor,
|
||||
style: textStyle,
|
||||
minLines: 2,
|
||||
decoration: new InputDecoration(
|
||||
labelText: 'Pickup Address',
|
||||
enabledBorder: UnderlineInputBorder(
|
||||
@@ -139,10 +144,17 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
]),
|
||||
);
|
||||
|
||||
MainModel mainModel = Provider.of<MainModel>(context);
|
||||
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
leading: new IconButton(
|
||||
icon: new Icon(Icons.close),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
backgroundColor: primaryColor,
|
||||
title: Text(AppTranslations.of(context).text("pickup.edit.title")),
|
||||
),
|
||||
@@ -153,23 +165,54 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: ListView(children: <Widget>[
|
||||
Text(
|
||||
"U Aung Zaw",
|
||||
style: TextStyle(fontSize: 15.0),
|
||||
Center(child: nameWidget(mainModel.customer.name)),
|
||||
phoneWidget(context, mainModel.customer.phoneNumber),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: Icon(Icons.location_on),
|
||||
),
|
||||
Expanded(child: pickUpAddress),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
"+82054857695",
|
||||
style: TextStyle(fontSize: 15.0),
|
||||
SizedBox(height: 25),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: Icon(Icons.timer),
|
||||
),
|
||||
Text('Pickup Time',
|
||||
style: TextStyle(color: Colors.grey, fontSize: 18)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 33),
|
||||
child: pickupTime,
|
||||
),
|
||||
pickUpAddress,
|
||||
SizedBox(height: 15),
|
||||
Text('Pickup Time'),
|
||||
SizedBox(height: 15),
|
||||
pickupTime,
|
||||
SizedBox(height: 15),
|
||||
noOfPackageBox,
|
||||
SizedBox(height: 15),
|
||||
weightBox
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: Icon(Octicons.package),
|
||||
),
|
||||
Expanded(child: noOfPackageBox),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
fcsInput("Total Weight (lb)", FontAwesomeIcons.weightHanging),
|
||||
SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
widget.pickUp != null
|
||||
? fcsDropDown("Assigned", MaterialCommunityIcons.worker)
|
||||
: Container(),
|
||||
fcsInput("Remark", MaterialCommunityIcons.note)
|
||||
]),
|
||||
)),
|
||||
widget.pickUp == null
|
||||
@@ -179,9 +222,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
child: Container(
|
||||
width: 250,
|
||||
child: FlatButton(
|
||||
shape: new RoundedRectangleBorder(
|
||||
borderRadius: new BorderRadius.circular(10)),
|
||||
child: Text('Request'),
|
||||
child: Text('Request for pickup'),
|
||||
color: primaryColor,
|
||||
textColor: Colors.white,
|
||||
onPressed: () {
|
||||
@@ -198,10 +239,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
child: Container(
|
||||
width: 250,
|
||||
child: FlatButton(
|
||||
shape: new RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
new BorderRadius.circular(10)),
|
||||
child: Text('Pickuped'),
|
||||
child: Text('Update'),
|
||||
color: primaryColor,
|
||||
textColor: Colors.white,
|
||||
onPressed: () {
|
||||
@@ -215,11 +253,8 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
child: Container(
|
||||
width: 250,
|
||||
child: FlatButton(
|
||||
shape: new RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
new BorderRadius.circular(10)),
|
||||
child: Text('Cancel'),
|
||||
color: Colors.blue,
|
||||
child: Text('Cancel Pickup'),
|
||||
color: Colors.grey[600],
|
||||
textColor: Colors.white,
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
|
||||
Reference in New Issue
Block a user