modify
This commit is contained in:
@@ -75,110 +75,88 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
Widget build(BuildContext context) {
|
||||
var pickupModel = Provider.of<PickUpModel>(context);
|
||||
|
||||
final pickUpAddress = Container(
|
||||
child: TextFormField(
|
||||
maxLines: null,
|
||||
controller: _addressEditingController,
|
||||
cursorColor: primaryColor,
|
||||
style: textStyle,
|
||||
minLines: 2,
|
||||
decoration: new InputDecoration(
|
||||
labelText: 'Pickup Address',
|
||||
disabledBorder: InputBorder.none,
|
||||
enabledBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
||||
),
|
||||
));
|
||||
final pickUpAddress = fcsInput('Pickup Address', Icons.location_on,
|
||||
controller: _addressEditingController);
|
||||
|
||||
final pickUpAddressReadOnly = Container(
|
||||
child: FCSTextFieldReadOnly(
|
||||
controller: _addressEditingController,
|
||||
label: 'Pickup Address',
|
||||
));
|
||||
final pickUpAddressReadOnly = fcsInputReadOnly(
|
||||
'Pickup Address', Icons.location_on,
|
||||
controller: _addressEditingController);
|
||||
|
||||
final pickupTime = Container(
|
||||
height: 50.0,
|
||||
child: Row(children: <Widget>[
|
||||
Container(
|
||||
width: 70.0,
|
||||
child: TextFormField(
|
||||
controller: _fromTimeEditingController,
|
||||
cursorColor: primaryColor,
|
||||
decoration: new InputDecoration(
|
||||
labelText: 'From',
|
||||
enabledBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
||||
),
|
||||
)),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(' - '),
|
||||
),
|
||||
Container(
|
||||
width: 70.0,
|
||||
child: TextFormField(
|
||||
controller: _toTimeEditingController,
|
||||
cursorColor: primaryColor,
|
||||
decoration: new InputDecoration(
|
||||
labelText: 'To',
|
||||
enabledBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
||||
),
|
||||
)),
|
||||
]),
|
||||
final fromTimeBox = fcsInput(
|
||||
'From',
|
||||
Icons.timer,
|
||||
controller: _fromTimeEditingController,
|
||||
);
|
||||
|
||||
final pickupTimeReadOnly = Container(
|
||||
height: 50.0,
|
||||
child: Row(children: <Widget>[
|
||||
Container(
|
||||
width: 70.0,
|
||||
child: FCSTextFieldReadOnly(
|
||||
controller: _fromTimeEditingController, label: 'From')),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(' - '),
|
||||
),
|
||||
Container(
|
||||
width: 70.0,
|
||||
child: FCSTextFieldReadOnly(
|
||||
controller: _toTimeEditingController, label: 'To')),
|
||||
]),
|
||||
final toTimeBox = fcsInput(
|
||||
'To',
|
||||
null,
|
||||
controller: _toTimeEditingController,
|
||||
);
|
||||
|
||||
final noOfPackageBox = Container(
|
||||
height: 50.0,
|
||||
child: Row(children: <Widget>[
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
controller: _noOfPackageEditingController,
|
||||
cursorColor: primaryColor,
|
||||
textAlign: TextAlign.left,
|
||||
decoration: new InputDecoration(
|
||||
labelText: 'Number of Packages',
|
||||
enabledBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
||||
final fromTimeBoxReadOnly = fcsInputReadOnly(
|
||||
'From',
|
||||
Icons.timer,
|
||||
controller: _fromTimeEditingController,
|
||||
);
|
||||
|
||||
final toTimeBoxReadOnly = fcsInputReadOnly(
|
||||
'To',
|
||||
null,
|
||||
controller: _toTimeEditingController,
|
||||
);
|
||||
|
||||
final pickupTime = Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
child: fromTimeBox,
|
||||
width: 120,
|
||||
),
|
||||
)),
|
||||
]),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: Text('-'),
|
||||
),
|
||||
Container(
|
||||
child: toTimeBox,
|
||||
width: 120,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
final noOfPackageBoxReadonly = Container(
|
||||
height: 50.0,
|
||||
child: Row(children: <Widget>[
|
||||
Expanded(
|
||||
child: FCSTextFieldReadOnly(
|
||||
controller: _noOfPackageEditingController,
|
||||
label: 'Number of Packages')),
|
||||
]),
|
||||
final pickupTimeReadOnly = Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
SizedBox(height: 5),
|
||||
Container(
|
||||
child: fromTimeBoxReadOnly,
|
||||
width: 120,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: Text('-'),
|
||||
),
|
||||
Container(
|
||||
child: toTimeBoxReadOnly,
|
||||
width: 120,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
final noOfPackageBox = fcsInput(
|
||||
'Number of Packages',
|
||||
Octicons.package,
|
||||
controller: _noOfPackageEditingController,
|
||||
);
|
||||
|
||||
final noOfPackageBoxReadonly = fcsInputReadOnly(
|
||||
'Number of Packages',
|
||||
Octicons.package,
|
||||
controller: _noOfPackageEditingController,
|
||||
);
|
||||
|
||||
final requestDateBox = Container(
|
||||
@@ -212,7 +190,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
EdgeInsets.symmetric(vertical: 10.0, horizontal: 0.0),
|
||||
icon: Icon(
|
||||
Icons.date_range,
|
||||
color: Colors.black87,
|
||||
color: Colors.grey,
|
||||
)),
|
||||
validator: (value) {
|
||||
if (value.isEmpty) {
|
||||
@@ -258,62 +236,22 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
ExpansionTile(
|
||||
title: Text('Pickup Location / Time'),
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: Icon(Icons.location_on),
|
||||
),
|
||||
Expanded(
|
||||
child: widget.pickUp == null
|
||||
? pickUpAddress
|
||||
: widget.pickUp.status == 'Pending'
|
||||
? pickUpAddress
|
||||
: pickUpAddressReadOnly),
|
||||
],
|
||||
),
|
||||
child: widget.pickUp == null
|
||||
? pickUpAddress
|
||||
: widget.pickUp.status == 'Pending'
|
||||
? pickUpAddress
|
||||
: pickUpAddressReadOnly,
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: Icon(Icons.timer),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: Text('Pickup Time',
|
||||
style: TextStyle(
|
||||
color: Colors.grey, fontSize: 14)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
SizedBox(height: 5),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 33),
|
||||
child: widget.pickUp == null
|
||||
? pickupTime
|
||||
: widget.pickUp.status == 'Pending'
|
||||
? pickupTime
|
||||
: pickupTimeReadOnly,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
widget.pickUp == null
|
||||
? pickupTime
|
||||
: widget.pickUp.status == 'Pending'
|
||||
? pickupTime
|
||||
: pickupTimeReadOnly,
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
child: Column(
|
||||
@@ -323,7 +261,6 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
],
|
||||
),
|
||||
ExpansionTile(
|
||||
@@ -331,23 +268,11 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: Icon(Octicons.package),
|
||||
),
|
||||
Expanded(
|
||||
child: widget.pickUp == null
|
||||
? noOfPackageBox
|
||||
: widget.pickUp.status == 'Pending'
|
||||
? noOfPackageBox
|
||||
: noOfPackageBoxReadonly),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 15,
|
||||
child: widget.pickUp == null
|
||||
? noOfPackageBox
|
||||
: widget.pickUp.status == 'Pending'
|
||||
? noOfPackageBox
|
||||
: noOfPackageBoxReadonly,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
@@ -363,12 +288,11 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
FontAwesomeIcons.weightHanging,
|
||||
controller: _weightEditingController),
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
child: fcsInput("Remark", MaterialCommunityIcons.note),
|
||||
),
|
||||
SizedBox(height: 25),
|
||||
SizedBox(height: 10.0),
|
||||
],
|
||||
),
|
||||
ExpansionTile(
|
||||
@@ -387,22 +311,19 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
"Name", FontAwesomeIcons.user,
|
||||
controller:
|
||||
_recipientNameEditingController)),
|
||||
SizedBox(height: 25),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
child: widget.pickUp == null
|
||||
? fcsInput("Phone Number", FontAwesomeIcons.phone,
|
||||
? fcsInput("Phone Number", Icons.phone,
|
||||
controller: _recipientPhoneEditingController)
|
||||
: widget.pickUp.status == 'Pending'
|
||||
? fcsInput(
|
||||
"Phone Number", FontAwesomeIcons.phone,
|
||||
? fcsInput("Phone Number", Icons.phone,
|
||||
controller:
|
||||
_recipientPhoneEditingController)
|
||||
: fcsInputReadOnly(
|
||||
"Phone Number", FontAwesomeIcons.phone,
|
||||
"Phone Number", Icons.phone,
|
||||
controller:
|
||||
_recipientPhoneEditingController)),
|
||||
SizedBox(height: 25),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
child: widget.pickUp == null
|
||||
@@ -417,7 +338,6 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
"Address", Icons.location_on,
|
||||
controller:
|
||||
_recipientAddressEditingController)),
|
||||
SizedBox(height: 25),
|
||||
],
|
||||
),
|
||||
ExpansionTile(
|
||||
@@ -432,9 +352,6 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
)
|
||||
: Container()
|
||||
: Container(),
|
||||
SizedBox(
|
||||
height: 25,
|
||||
),
|
||||
],
|
||||
),
|
||||
]),
|
||||
|
||||
Reference in New Issue
Block a user