add packages
This commit is contained in:
@@ -104,8 +104,8 @@
|
|||||||
"reg.confirm":"Submit Registration?",
|
"reg.confirm":"Submit Registration?",
|
||||||
"reg.date":"Registeration Date",
|
"reg.date":"Registeration Date",
|
||||||
|
|
||||||
"profile.title": "My Profile",
|
"profile.title": "FCS Profile",
|
||||||
"profile.edit_title": "Edit My Profile",
|
"profile.edit_title": "Edit FCS Profile",
|
||||||
"profile.name": "Name",
|
"profile.name": "Name",
|
||||||
"profile.phone": "Phone",
|
"profile.phone": "Phone",
|
||||||
"profile.language": "Languages",
|
"profile.language": "Languages",
|
||||||
@@ -481,7 +481,7 @@
|
|||||||
"user.deliveryAddress":"My delivery address",
|
"user.deliveryAddress":"My delivery address",
|
||||||
"user.buying_instruction":"See below instructions to add USA shipping address while shoping online",
|
"user.buying_instruction":"See below instructions to add USA shipping address while shoping online",
|
||||||
|
|
||||||
"buy_online":"Buying online",
|
"buy_online":"Buying Online",
|
||||||
"buy_online.title":"BUYING ONLINE",
|
"buy_online.title":"BUYING ONLINE",
|
||||||
"buy.amazon":"Amazon",
|
"buy.amazon":"Amazon",
|
||||||
"buy.newegg":"Newegg",
|
"buy.newegg":"Newegg",
|
||||||
@@ -490,10 +490,10 @@
|
|||||||
|
|
||||||
"notifications.title":"Notification",
|
"notifications.title":"Notification",
|
||||||
|
|
||||||
"staff.title":"FCS staffs",
|
"staff.title":"Staffs",
|
||||||
"staff.list.title":"FCS STAFFS",
|
"staff.list.title":"STAFFS",
|
||||||
"staff.new":"New Staff",
|
"staff.new":"New Staff",
|
||||||
"staff.form.title":"FCS STAFF",
|
"staff.form.title":"STAFF",
|
||||||
"staff.add":"Add",
|
"staff.add":"Add",
|
||||||
"staff.update":"Update",
|
"staff.update":"Update",
|
||||||
|
|
||||||
@@ -506,7 +506,7 @@
|
|||||||
"pickup": "Pickups",
|
"pickup": "Pickups",
|
||||||
"pickup.title": "PICKUPS",
|
"pickup.title": "PICKUPS",
|
||||||
"pickup.new": "New Pickup",
|
"pickup.new": "New Pickup",
|
||||||
"pickup.edit.title": "Pickup",
|
"pickup.edit.title": "PICKUP",
|
||||||
|
|
||||||
"rate":"Rates",
|
"rate":"Rates",
|
||||||
"rate.title":"RATES",
|
"rate.title":"RATES",
|
||||||
@@ -518,5 +518,18 @@
|
|||||||
"package.name":"Packages",
|
"package.name":"Packages",
|
||||||
"package.title":"PACKAGES",
|
"package.title":"PACKAGES",
|
||||||
"package.new":"New Package",
|
"package.new":"New Package",
|
||||||
"package.edit.title":"PACKAGE"
|
"package.edit.title":"PACKAGE",
|
||||||
|
|
||||||
|
"pickup.date": "Pickup Date",
|
||||||
|
|
||||||
|
"message.btn":"Messages",
|
||||||
|
"message.title":"MESSAGES",
|
||||||
|
|
||||||
|
"customers.btn": "Customers",
|
||||||
|
"customers.title": "CUSTOMERS",
|
||||||
|
|
||||||
|
"invoices.btn": "Invoices",
|
||||||
|
"invoices.title": "INVOICES",
|
||||||
|
|
||||||
|
"term":"TERMS"
|
||||||
}
|
}
|
||||||
@@ -537,5 +537,8 @@
|
|||||||
|
|
||||||
"pickup.title": "Pickups",
|
"pickup.title": "Pickups",
|
||||||
"pickup.new": "New Pickup",
|
"pickup.new": "New Pickup",
|
||||||
"pickup.edit.title": "Pickup"
|
"pickup.edit.title": "PICKUP",
|
||||||
|
"pickup.date": "Pickup Date",
|
||||||
|
|
||||||
|
"term":"TERMS"
|
||||||
}
|
}
|
||||||
BIN
assets/logo_btn.jpg
Normal file
BIN
assets/logo_btn.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
BIN
assets/logo_btn.png
Normal file
BIN
assets/logo_btn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
@@ -54,7 +54,15 @@ class MainModel extends ChangeNotifier {
|
|||||||
'154-19 64th Ave.Flushing, \nNY 11367 \nTEL. +1 (929) 215-2247',
|
'154-19 64th Ave.Flushing, \nNY 11367 \nTEL. +1 (929) 215-2247',
|
||||||
deliveryAddress: '39 42th St. Kyaut Ta Thar Township Yangon');
|
deliveryAddress: '39 42th St. Kyaut Ta Thar Township Yangon');
|
||||||
|
|
||||||
Setting setting;
|
User recipient = User(
|
||||||
|
name: "Ko Myo Min",
|
||||||
|
phoneNumber: '+95 9 444444444',
|
||||||
|
shippingAddress: '154-19 64th Ave.Flushing, \nNY 11367',
|
||||||
|
deliveryAddress: '39 42th St. Kyaut Ta Thar Township Yangon');
|
||||||
|
|
||||||
|
Setting setting = Setting(
|
||||||
|
terms:
|
||||||
|
'[{"insert":"Minimum shipping weight is 1lbs.\nOversized goods, Light weight/Large volume items, laptops, phones, tablets may incur extra charges based on pecifications.Please contact us for pricing.\nGoods with lithium battary needs extra packaging and declaration. Please inform us ahead of time so that we can process your package accordingly.\nLoose Batteries, Drones, and Prescription medicines are not allowed on aircraft.\nPayment: We accept money orders, any US bank transfers via Zelle, AYA, KBZ and CB. No COD except for pick-ups.\nPayments made in Myanmar will incur 2% tranfer fee\n"}]');
|
||||||
PackageInfo packageInfo;
|
PackageInfo packageInfo;
|
||||||
bool isLoaded = true;
|
bool isLoaded = true;
|
||||||
bool isOnline = true;
|
bool isOnline = true;
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ class PickUpModel extends BaseModel {
|
|||||||
|
|
||||||
var profile = FCSProfile(
|
var profile = FCSProfile(
|
||||||
id: '1',
|
id: '1',
|
||||||
usaAddress:
|
usaAddress: '154-19 64th Ave.\nFlushing, NY 11367',
|
||||||
'154-19 64th Ave.\nFlushing, NY 11367\nTEL. +1 (929) 215-2247',
|
|
||||||
mmAddress: 'FCS Trading Myanmar\nRoom 333, Yangon',
|
mmAddress: 'FCS Trading Myanmar\nRoom 333, Yangon',
|
||||||
usaContactNumber: '1 (929) 215-2247',
|
usaContactNumber: '1 (929) 215-2247',
|
||||||
mmContactNumber: '+95 9 700224723',
|
mmContactNumber: '+95 9 700224723',
|
||||||
@@ -33,8 +32,7 @@ class PickUpModel extends BaseModel {
|
|||||||
weight: 25,
|
weight: 25,
|
||||||
status: 'Pending',
|
status: 'Pending',
|
||||||
date: DateTime(2020, 5, 1),
|
date: DateTime(2020, 5, 1),
|
||||||
address:
|
address: '154-19 64th Ave.\nFlushing, NY 11367'),
|
||||||
'154-19 64th Ave.\nFlushing, NY 11367\nTEL. +1 (929) 215-2247'),
|
|
||||||
PickUp(
|
PickUp(
|
||||||
id: "P200125 - 12 May 2020",
|
id: "P200125 - 12 May 2020",
|
||||||
userName: "Ko Kyaw Nyi",
|
userName: "Ko Kyaw Nyi",
|
||||||
@@ -45,8 +43,7 @@ class PickUpModel extends BaseModel {
|
|||||||
weight: 25,
|
weight: 25,
|
||||||
status: 'Assigned',
|
status: 'Assigned',
|
||||||
date: DateTime(2020, 5, 6),
|
date: DateTime(2020, 5, 6),
|
||||||
address:
|
address: '154-19 64th Ave.\nFlushing, NY 11367'),
|
||||||
'154-19 64th Ave.\nFlushing, NY 11367\nTEL. +1 (929) 215-2247'),
|
|
||||||
PickUp(
|
PickUp(
|
||||||
id: "P200441 - 13 Apr 2020",
|
id: "P200441 - 13 Apr 2020",
|
||||||
userName: "Ko Kyaw Nyi",
|
userName: "Ko Kyaw Nyi",
|
||||||
@@ -57,8 +54,7 @@ class PickUpModel extends BaseModel {
|
|||||||
weight: 25,
|
weight: 25,
|
||||||
status: "Pickuped",
|
status: "Pickuped",
|
||||||
date: DateTime(2020, 5, 9),
|
date: DateTime(2020, 5, 9),
|
||||||
address:
|
address: '154-19 64th Ave.\nFlushing, NY 11367'),
|
||||||
'154-19 64th Ave.\nFlushing, NY 11367\nTEL. +1 (929) 215-2247'),
|
|
||||||
PickUp(
|
PickUp(
|
||||||
id: "P200412 - 12 Apr 2020",
|
id: "P200412 - 12 Apr 2020",
|
||||||
userName: "Ko Kyaw Nyi",
|
userName: "Ko Kyaw Nyi",
|
||||||
@@ -69,8 +65,7 @@ class PickUpModel extends BaseModel {
|
|||||||
weight: 25,
|
weight: 25,
|
||||||
status: 'Pickuped',
|
status: 'Pickuped',
|
||||||
date: DateTime(2020, 5, 15),
|
date: DateTime(2020, 5, 15),
|
||||||
address:
|
address: '154-19 64th Ave.\nFlushing, NY 11367'),
|
||||||
'154-19 64th Ave.\nFlushing, NY 11367\nTEL. +1 (929) 215-2247'),
|
|
||||||
PickUp(
|
PickUp(
|
||||||
id: "P200125 - 12 May 2020",
|
id: "P200125 - 12 May 2020",
|
||||||
userName: "Ko Kyaw Nyi",
|
userName: "Ko Kyaw Nyi",
|
||||||
@@ -81,8 +76,7 @@ class PickUpModel extends BaseModel {
|
|||||||
weight: 25,
|
weight: 25,
|
||||||
status: 'Pickuped',
|
status: 'Pickuped',
|
||||||
date: DateTime(2020, 5, 20),
|
date: DateTime(2020, 5, 20),
|
||||||
address:
|
address: '154-19 64th Ave.\nFlushing, NY 11367'),
|
||||||
'154-19 64th Ave.\nFlushing, NY 11367\nTEL. +1 (929) 215-2247'),
|
|
||||||
PickUp(
|
PickUp(
|
||||||
id: "P200441 - 13 Apr 2020",
|
id: "P200441 - 13 Apr 2020",
|
||||||
userName: "Ko Kyaw Nyi",
|
userName: "Ko Kyaw Nyi",
|
||||||
@@ -93,8 +87,7 @@ class PickUpModel extends BaseModel {
|
|||||||
weight: 25,
|
weight: 25,
|
||||||
status: "Pickuped",
|
status: "Pickuped",
|
||||||
date: DateTime(2020, 5, 21),
|
date: DateTime(2020, 5, 21),
|
||||||
address:
|
address: '154-19 64th Ave.\nFlushing, NY 11367'),
|
||||||
'154-19 64th Ave.\nFlushing, NY 11367\nTEL. +1 (929) 215-2247'),
|
|
||||||
PickUp(
|
PickUp(
|
||||||
id: "P200441 - 10 Apr 2020",
|
id: "P200441 - 10 Apr 2020",
|
||||||
userName: "Ko Kyaw Nyi",
|
userName: "Ko Kyaw Nyi",
|
||||||
@@ -105,8 +98,7 @@ class PickUpModel extends BaseModel {
|
|||||||
weight: 25,
|
weight: 25,
|
||||||
status: "Canceled",
|
status: "Canceled",
|
||||||
date: DateTime(2020, 5, 25),
|
date: DateTime(2020, 5, 25),
|
||||||
address:
|
address: '154-19 64th Ave.\nFlushing, NY 11367'),
|
||||||
'154-19 64th Ave.\nFlushing, NY 11367\nTEL. +1 (929) 215-2247'),
|
|
||||||
PickUp(
|
PickUp(
|
||||||
id: "P200441 - 6 Apr 2020",
|
id: "P200441 - 6 Apr 2020",
|
||||||
userName: "Ko Kyaw Nyi",
|
userName: "Ko Kyaw Nyi",
|
||||||
@@ -117,8 +109,7 @@ class PickUpModel extends BaseModel {
|
|||||||
weight: 25,
|
weight: 25,
|
||||||
status: "Canceled",
|
status: "Canceled",
|
||||||
date: DateTime(2020, 5, 27),
|
date: DateTime(2020, 5, 27),
|
||||||
address:
|
address: '154-19 64th Ave.\nFlushing, NY 11367'),
|
||||||
'154-19 64th Ave.\nFlushing, NY 11367\nTEL. +1 (929) 215-2247'),
|
|
||||||
];
|
];
|
||||||
|
|
||||||
List<PickUp> get canceled {
|
List<PickUp> get canceled {
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ class _FCSProfilePageState extends State<FCSProfilePage> {
|
|||||||
));
|
));
|
||||||
|
|
||||||
final mmAddress = Container(
|
final mmAddress = Container(
|
||||||
height: 50.0,
|
|
||||||
child: Row(children: <Widget>[
|
child: Row(children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: FCSTextField(
|
child: FCSTextField(
|
||||||
@@ -67,7 +66,6 @@ class _FCSProfilePageState extends State<FCSProfilePage> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
final contactNumber = Container(
|
final contactNumber = Container(
|
||||||
height: 50.0,
|
|
||||||
child: Row(children: <Widget>[
|
child: Row(children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: FCSTextField(
|
child: FCSTextField(
|
||||||
@@ -78,7 +76,6 @@ class _FCSProfilePageState extends State<FCSProfilePage> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
final mmContactNumber = Container(
|
final mmContactNumber = Container(
|
||||||
height: 50.0,
|
|
||||||
child: Row(children: <Widget>[
|
child: Row(children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: FCSTextField(
|
child: FCSTextField(
|
||||||
@@ -89,7 +86,6 @@ class _FCSProfilePageState extends State<FCSProfilePage> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
final mailBox = Container(
|
final mailBox = Container(
|
||||||
height: 50.0,
|
|
||||||
child: Row(children: <Widget>[
|
child: Row(children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: FCSTextField(
|
child: FCSTextField(
|
||||||
@@ -100,7 +96,6 @@ class _FCSProfilePageState extends State<FCSProfilePage> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
final fbLinkBox = Container(
|
final fbLinkBox = Container(
|
||||||
height: 50.0,
|
|
||||||
child: Row(children: <Widget>[
|
child: Row(children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: FCSTextField(
|
child: FCSTextField(
|
||||||
@@ -112,28 +107,29 @@ class _FCSProfilePageState extends State<FCSProfilePage> {
|
|||||||
inAsyncCall: _isLoading,
|
inAsyncCall: _isLoading,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
centerTitle: true,
|
||||||
backgroundColor: primaryColor,
|
backgroundColor: primaryColor,
|
||||||
title: Text('Profile'),
|
title: Text('FCS PROFILE'),
|
||||||
),
|
),
|
||||||
body: Card(
|
body: Card(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(20.0),
|
padding: const EdgeInsets.only(left: 20.0),
|
||||||
child: ListView(children: <Widget>[
|
child: ListView(children: <Widget>[
|
||||||
usaAddress,
|
usaAddress,
|
||||||
SizedBox(height: 15),
|
SizedBox(height: 10),
|
||||||
mmAddress,
|
mmAddress,
|
||||||
SizedBox(height: 15),
|
SizedBox(height: 10),
|
||||||
contactNumber,
|
contactNumber,
|
||||||
SizedBox(height: 15),
|
SizedBox(height: 10),
|
||||||
mmContactNumber,
|
mmContactNumber,
|
||||||
SizedBox(height: 15),
|
SizedBox(height: 10),
|
||||||
mailBox,
|
mailBox,
|
||||||
SizedBox(height: 15),
|
SizedBox(height: 10),
|
||||||
fbLinkBox,
|
fbLinkBox,
|
||||||
SizedBox(height: 15),
|
SizedBox(height: 10),
|
||||||
]),
|
]),
|
||||||
)),
|
)),
|
||||||
widget.pickUp == null
|
widget.pickUp == null
|
||||||
@@ -143,8 +139,6 @@ class _FCSProfilePageState extends State<FCSProfilePage> {
|
|||||||
child: Container(
|
child: Container(
|
||||||
width: 250,
|
width: 250,
|
||||||
child: FlatButton(
|
child: FlatButton(
|
||||||
shape: new RoundedRectangleBorder(
|
|
||||||
borderRadius: new BorderRadius.circular(10)),
|
|
||||||
child: Text('Update'),
|
child: Text('Update'),
|
||||||
color: primaryColor,
|
color: primaryColor,
|
||||||
textColor: Colors.white,
|
textColor: Colors.white,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:country_code_picker/country_code.dart';
|
||||||
import 'package:fcs/model/main_model.dart';
|
import 'package:fcs/model/main_model.dart';
|
||||||
import 'package:fcs/pages/shipment_list.dart';
|
import 'package:fcs/pages/shipment_list.dart';
|
||||||
import 'package:fcs/pages_fcs/package_list.dart';
|
import 'package:fcs/pages_fcs/package_list.dart';
|
||||||
@@ -94,30 +95,15 @@ class _HomePageState extends State<HomePage> {
|
|||||||
final numberFormatter = new NumberFormat("#,###");
|
final numberFormatter = new NumberFormat("#,###");
|
||||||
|
|
||||||
String pin;
|
String pin;
|
||||||
|
List<bool> isSelected = [true, false];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
login = Provider.of<MainModel>(context).isLogin();
|
login = Provider.of<MainModel>(context).isLogin();
|
||||||
final packagesBtn = _buildBtn2("package.name",
|
final packagesBtn = _buildBtn2("package.name",
|
||||||
icon: Octicons.package,
|
icon: Octicons.package,
|
||||||
btnCallback: () => Navigator.of(context)
|
btnCallback: () =>
|
||||||
.push(MaterialPageRoute(builder: (_) => PackageList())));
|
Navigator.of(context).push(BottomUpPageRoute(PackageList())));
|
||||||
|
|
||||||
final announcementBtn = _buildBtn2("announcement.title",
|
|
||||||
icon: Icons.announcement,
|
|
||||||
btnCallback: () => Navigator.of(context)
|
|
||||||
.push(MaterialPageRoute(builder: (_) => AnnouncementList())));
|
|
||||||
|
|
||||||
final reportBtn = _buildBtn2("report.title",
|
|
||||||
icon: FontAwesomeIcons.paperPlane,
|
|
||||||
imgIcon: Image.asset(
|
|
||||||
"assets/report.png",
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
// color: primaryColor,
|
|
||||||
),
|
|
||||||
btnCallback: () => Navigator.of(context)
|
|
||||||
.push(MaterialPageRoute(builder: (_) => ReportList())));
|
|
||||||
|
|
||||||
final pickUpBtn = _buildBtn2("pickup",
|
final pickUpBtn = _buildBtn2("pickup",
|
||||||
icon: MaterialCommunityIcons.directions,
|
icon: MaterialCommunityIcons.directions,
|
||||||
@@ -130,9 +116,10 @@ class _HomePageState extends State<HomePage> {
|
|||||||
Navigator.of(context).push(BottomUpPageRoute(ShipmentRates())));
|
Navigator.of(context).push(BottomUpPageRoute(ShipmentRates())));
|
||||||
|
|
||||||
final fcsProfileBtn = _buildBtn2("profile.title",
|
final fcsProfileBtn = _buildBtn2("profile.title",
|
||||||
icon: Icons.account_circle,
|
// imgIcon: Image.asset("assets/logo_btn.png", height: 25,color:Colors.white),
|
||||||
btnCallback: () => Navigator.of(context)
|
icon: MaterialCommunityIcons.home_city,
|
||||||
.push(MaterialPageRoute(builder: (_) => FCSProfilePage())));
|
btnCallback: () =>
|
||||||
|
Navigator.of(context).push(BottomUpPageRoute(FCSProfilePage())));
|
||||||
|
|
||||||
final shipmentBtn = _buildBtn2("shipment.title",
|
final shipmentBtn = _buildBtn2("shipment.title",
|
||||||
icon: Ionicons.ios_airplane,
|
icon: Ionicons.ios_airplane,
|
||||||
@@ -142,19 +129,8 @@ class _HomePageState extends State<HomePage> {
|
|||||||
height: 50,
|
height: 50,
|
||||||
color: primaryColor,
|
color: primaryColor,
|
||||||
),
|
),
|
||||||
btnCallback: () => Navigator.of(context)
|
btnCallback: () =>
|
||||||
.push(MaterialPageRoute(builder: (_) => ShipmentList())));
|
Navigator.of(context).push(BottomUpPageRoute(ShipmentList())));
|
||||||
|
|
||||||
final termBtn = _buildBtn2("term.title",
|
|
||||||
icon: FontAwesomeIcons.fileContract,
|
|
||||||
imgIcon: Image.asset(
|
|
||||||
"assets/term.png",
|
|
||||||
width: 40,
|
|
||||||
height: 30,
|
|
||||||
color: primaryColor,
|
|
||||||
), btnCallback: () {
|
|
||||||
Navigator.push(context, MaterialPageRoute(builder: (context) => Term()));
|
|
||||||
});
|
|
||||||
|
|
||||||
final buyingBtn = _buildBtn2("buy_online",
|
final buyingBtn = _buildBtn2("buy_online",
|
||||||
icon: MaterialCommunityIcons.cart_outline, btnCallback: () {
|
icon: MaterialCommunityIcons.cart_outline, btnCallback: () {
|
||||||
@@ -163,8 +139,8 @@ class _HomePageState extends State<HomePage> {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
final notiBtn = _buildBtn2("notifications.title", icon: Icons.notifications,
|
final notiBtn =
|
||||||
btnCallback: () {
|
_buildBtn2("message.btn", icon: Icons.message, btnCallback: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
BottomUpPageRoute(NotificationList()),
|
BottomUpPageRoute(NotificationList()),
|
||||||
@@ -172,17 +148,19 @@ class _HomePageState extends State<HomePage> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
final staffBtn = _buildBtn2("staff.title",
|
final staffBtn = _buildBtn2("staff.title",
|
||||||
icon: SimpleLineIcons.people,
|
icon: MaterialCommunityIcons.worker,
|
||||||
btnCallback: () => Navigator.of(context)
|
btnCallback: () =>
|
||||||
.push(MaterialPageRoute(builder: (_) => StaffList())));
|
Navigator.of(context).push(BottomUpPageRoute(StaffList())));
|
||||||
|
|
||||||
final _bankAccountsBtn = _buildBtn2("banks.title",
|
final customersBtn = _buildBtn2("customers.btn",
|
||||||
icon: FontAwesomeIcons.moneyCheck, btnCallback: () {
|
icon: Feather.users,
|
||||||
Navigator.push(
|
btnCallback: () =>
|
||||||
context,
|
Navigator.of(context).push(BottomUpPageRoute(StaffList())));
|
||||||
MaterialPageRoute(builder: (context) => BankAccounts()),
|
|
||||||
);
|
final invoicesBtn = _buildBtn2("invoices.btn",
|
||||||
});
|
icon: FontAwesomeIcons.fileInvoice,
|
||||||
|
btnCallback: () =>
|
||||||
|
Navigator.of(context).push(BottomUpPageRoute(StaffList())));
|
||||||
|
|
||||||
List<Widget> widgets = [];
|
List<Widget> widgets = [];
|
||||||
widgets.add(buyingBtn);
|
widgets.add(buyingBtn);
|
||||||
@@ -190,13 +168,11 @@ class _HomePageState extends State<HomePage> {
|
|||||||
widgets.add(shipmentBtn);
|
widgets.add(shipmentBtn);
|
||||||
widgets.add(notiBtn);
|
widgets.add(notiBtn);
|
||||||
widgets.add(staffBtn);
|
widgets.add(staffBtn);
|
||||||
widgets.add(announcementBtn);
|
|
||||||
widgets.add(fcsProfileBtn);
|
widgets.add(fcsProfileBtn);
|
||||||
widgets.add(shipmentCostBtn);
|
widgets.add(shipmentCostBtn);
|
||||||
widgets.add(reportBtn);
|
|
||||||
widgets.add(termBtn);
|
|
||||||
widgets.add(_bankAccountsBtn);
|
|
||||||
widgets.add(packagesBtn);
|
widgets.add(packagesBtn);
|
||||||
|
widgets.add(customersBtn);
|
||||||
|
widgets.add(invoicesBtn);
|
||||||
|
|
||||||
return OfflineRedirect(
|
return OfflineRedirect(
|
||||||
child: FlavorBanner(
|
child: FlavorBanner(
|
||||||
@@ -210,16 +186,23 @@ class _HomePageState extends State<HomePage> {
|
|||||||
),
|
),
|
||||||
actions: login
|
actions: login
|
||||||
? <Widget>[
|
? <Widget>[
|
||||||
IconButton(
|
ToggleButtons(
|
||||||
onPressed: () {
|
children: <Widget>[
|
||||||
Navigator.push(
|
Image.asset(
|
||||||
context,
|
'icons/flags/png/gb.png',
|
||||||
MaterialPageRoute(
|
package: 'country_icons',
|
||||||
builder: (context) => Contact()),
|
fit: BoxFit.fitWidth,
|
||||||
);
|
width: 25,
|
||||||
},
|
),
|
||||||
iconSize: 30,
|
Image.asset(
|
||||||
icon: Icon(Icons.notifications),
|
'icons/flags/png/mm.png',
|
||||||
|
package: 'country_icons',
|
||||||
|
fit: BoxFit.fitWidth,
|
||||||
|
width: 25,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
onPressed: _langChange,
|
||||||
|
isSelected: isSelected,
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@@ -234,6 +217,24 @@ class _HomePageState extends State<HomePage> {
|
|||||||
),
|
),
|
||||||
]
|
]
|
||||||
: <Widget>[
|
: <Widget>[
|
||||||
|
ToggleButtons(
|
||||||
|
children: <Widget>[
|
||||||
|
Image.asset(
|
||||||
|
'icons/flags/png/gb.png',
|
||||||
|
package: 'country_icons',
|
||||||
|
fit: BoxFit.fitWidth,
|
||||||
|
width: 25,
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
'icons/flags/png/mm.png',
|
||||||
|
package: 'country_icons',
|
||||||
|
fit: BoxFit.fitWidth,
|
||||||
|
width: 25,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
onPressed: _langChange,
|
||||||
|
isSelected: isSelected,
|
||||||
|
),
|
||||||
FlatButton(
|
FlatButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
@@ -244,21 +245,10 @@ class _HomePageState extends State<HomePage> {
|
|||||||
},
|
},
|
||||||
// iconSize: 30,
|
// iconSize: 30,
|
||||||
child: Text(
|
child: Text(
|
||||||
"Sign in",
|
"Sign In",
|
||||||
style: siginButtonStyle,
|
style: siginButtonStyle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (context) => SigninPage()),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
iconSize: 30,
|
|
||||||
icon: Icon(MaterialCommunityIcons.login),
|
|
||||||
)
|
|
||||||
]),
|
]),
|
||||||
body: Container(
|
body: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@@ -321,6 +311,15 @@ class _HomePageState extends State<HomePage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_langChange(index) {
|
||||||
|
setState(() {
|
||||||
|
isSelected.asMap().forEach((i, e) {
|
||||||
|
isSelected[i] = false;
|
||||||
|
});
|
||||||
|
isSelected[index] = !isSelected[index];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
Widget _buildTile(Widget child, {Function() onTap}) {
|
Widget _buildTile(Widget child, {Function() onTap}) {
|
||||||
return Material(
|
return Material(
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
@@ -403,7 +402,9 @@ class _HomePageState extends State<HomePage> {
|
|||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 60,
|
width: 60,
|
||||||
height: 60,
|
height: 60,
|
||||||
child: Icon(icon, color: Colors.white, size: 30)),
|
child: icon == null
|
||||||
|
? Container(width: 10, height: 10, child: imgIcon)
|
||||||
|
: Icon(icon, color: Colors.white, size: 30)),
|
||||||
onTap: btnCallback,
|
onTap: btnCallback,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -54,8 +54,10 @@ class _InstructionPageState extends State<InstructionPage> {
|
|||||||
body: Container(
|
body: Container(
|
||||||
padding: EdgeInsets.only(left: 5, right: 5, top: 5),
|
padding: EdgeInsets.only(left: 5, right: 5, top: 5),
|
||||||
child: Card(elevation: 0,
|
child: Card(elevation: 0,
|
||||||
|
child: Expanded(
|
||||||
child: FittedBox(
|
child: FittedBox(
|
||||||
child: Image.asset(widget.image), fit: BoxFit.contain)),
|
child: Image.asset(widget.image), fit: BoxFit.contain),
|
||||||
|
)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,8 +2,12 @@ import 'package:fcs/model/main_model.dart';
|
|||||||
import 'package:fcs/model/pickup_model.dart';
|
import 'package:fcs/model/pickup_model.dart';
|
||||||
import 'package:fcs/pages/util.dart';
|
import 'package:fcs/pages/util.dart';
|
||||||
import 'package:fcs/vo/pickup.dart';
|
import 'package:fcs/vo/pickup.dart';
|
||||||
|
import 'package:fcs/widget/fcs_text_field.dart';
|
||||||
|
import 'package:fcs/widget/fcs_text_field_readonly.dart';
|
||||||
|
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
|
||||||
import 'package:flutter_icons/flutter_icons.dart';
|
import 'package:flutter_icons/flutter_icons.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:fcs/widget/localization/app_translations.dart';
|
import 'package:fcs/widget/localization/app_translations.dart';
|
||||||
|
|
||||||
@@ -21,6 +25,8 @@ class PickUpEditor extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _PickUpEditorState extends State<PickUpEditor> {
|
class _PickUpEditorState extends State<PickUpEditor> {
|
||||||
|
var dateFormatter = new DateFormat('dd MMM yyyy');
|
||||||
|
|
||||||
TextEditingController _addressEditingController = new TextEditingController();
|
TextEditingController _addressEditingController = new TextEditingController();
|
||||||
TextEditingController _fromTimeEditingController =
|
TextEditingController _fromTimeEditingController =
|
||||||
new TextEditingController();
|
new TextEditingController();
|
||||||
@@ -28,9 +34,17 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
|||||||
TextEditingController _noOfPackageEditingController =
|
TextEditingController _noOfPackageEditingController =
|
||||||
new TextEditingController();
|
new TextEditingController();
|
||||||
TextEditingController _weightEditingController = new TextEditingController();
|
TextEditingController _weightEditingController = new TextEditingController();
|
||||||
|
TextEditingController _recipientNameEditingController =
|
||||||
|
new TextEditingController();
|
||||||
|
TextEditingController _recipientPhoneEditingController =
|
||||||
|
new TextEditingController();
|
||||||
|
TextEditingController _recipientAddressEditingController =
|
||||||
|
new TextEditingController();
|
||||||
|
TextEditingController _pickupDate = new TextEditingController();
|
||||||
|
|
||||||
PickUp _pickUp;
|
PickUp _pickUp;
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
|
var now = new DateTime.now();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -42,6 +56,13 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
|||||||
_toTimeEditingController.text = _pickUp.toTime;
|
_toTimeEditingController.text = _pickUp.toTime;
|
||||||
_noOfPackageEditingController.text = _pickUp.numberOfPackage.toString();
|
_noOfPackageEditingController.text = _pickUp.numberOfPackage.toString();
|
||||||
_weightEditingController.text = _pickUp.weight.toString();
|
_weightEditingController.text = _pickUp.weight.toString();
|
||||||
|
_pickupDate.text = dateFormatter.format(now);
|
||||||
|
|
||||||
|
var mainModel = Provider.of<MainModel>(context, listen: false);
|
||||||
|
_recipientNameEditingController.text = mainModel.recipient.name;
|
||||||
|
_recipientPhoneEditingController.text = mainModel.recipient.phoneNumber;
|
||||||
|
_recipientAddressEditingController.text =
|
||||||
|
mainModel.recipient.shippingAddress;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,6 +84,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
|||||||
minLines: 2,
|
minLines: 2,
|
||||||
decoration: new InputDecoration(
|
decoration: new InputDecoration(
|
||||||
labelText: 'Pickup Address',
|
labelText: 'Pickup Address',
|
||||||
|
disabledBorder: InputBorder.none,
|
||||||
enabledBorder: UnderlineInputBorder(
|
enabledBorder: UnderlineInputBorder(
|
||||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
||||||
focusedBorder: UnderlineInputBorder(
|
focusedBorder: UnderlineInputBorder(
|
||||||
@@ -70,6 +92,12 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
|||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
final pickUpAddressReadOnly = Container(
|
||||||
|
child: FCSTextFieldReadOnly(
|
||||||
|
controller: _addressEditingController,
|
||||||
|
label: 'Pickup Address',
|
||||||
|
));
|
||||||
|
|
||||||
final pickupTime = Container(
|
final pickupTime = Container(
|
||||||
height: 50.0,
|
height: 50.0,
|
||||||
child: Row(children: <Widget>[
|
child: Row(children: <Widget>[
|
||||||
@@ -106,6 +134,24 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
|||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
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 noOfPackageBox = Container(
|
final noOfPackageBox = Container(
|
||||||
height: 50.0,
|
height: 50.0,
|
||||||
child: Row(children: <Widget>[
|
child: Row(children: <Widget>[
|
||||||
@@ -125,25 +171,58 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
|||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
|
|
||||||
final weightBox = Container(
|
final noOfPackageBoxReadonly = Container(
|
||||||
height: 50.0,
|
height: 50.0,
|
||||||
child: Row(children: <Widget>[
|
child: Row(children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextFormField(
|
child: FCSTextFieldReadOnly(
|
||||||
controller: _weightEditingController,
|
controller: _noOfPackageEditingController,
|
||||||
cursorColor: primaryColor,
|
label: 'Number of Packages')),
|
||||||
textAlign: TextAlign.left,
|
|
||||||
decoration: new InputDecoration(
|
|
||||||
labelText: 'Total Weight (lb)',
|
|
||||||
enabledBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
|
||||||
focusedBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
final requestDateBox = Container(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
DatePicker.showDatePicker(
|
||||||
|
context,
|
||||||
|
showTitleActions: true,
|
||||||
|
currentTime: _pickupDate.text == ""
|
||||||
|
? null
|
||||||
|
: dateFormatter.parse(_pickupDate.text),
|
||||||
|
minTime: DateTime.now(),
|
||||||
|
maxTime: DateTime(2030, 12, 31),
|
||||||
|
onConfirm: (date) {},
|
||||||
|
locale: LocaleType.en,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: TextFormField(
|
||||||
|
controller: _pickupDate,
|
||||||
|
autofocus: false,
|
||||||
|
cursorColor: primaryColor,
|
||||||
|
style: textStyle,
|
||||||
|
enabled: false,
|
||||||
|
keyboardType: TextInputType.datetime,
|
||||||
|
decoration: new InputDecoration(
|
||||||
|
border: InputBorder.none,
|
||||||
|
focusedBorder: InputBorder.none,
|
||||||
|
labelText: AppTranslations.of(context).text("pickup.date"),
|
||||||
|
// labelStyle: languageModel.isEng ? labelStyle : labelStyleMM,
|
||||||
|
contentPadding:
|
||||||
|
EdgeInsets.symmetric(vertical: 10.0, horizontal: 0.0),
|
||||||
|
icon: Icon(
|
||||||
|
Icons.date_range,
|
||||||
|
color: Colors.black87,
|
||||||
|
)),
|
||||||
|
validator: (value) {
|
||||||
|
if (value.isEmpty) {
|
||||||
|
return AppTranslations.of(context).text("do.form.date");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
));
|
||||||
|
|
||||||
MainModel mainModel = Provider.of<MainModel>(context);
|
MainModel mainModel = Provider.of<MainModel>(context);
|
||||||
|
|
||||||
return LocalProgress(
|
return LocalProgress(
|
||||||
@@ -166,53 +245,198 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
|||||||
padding: const EdgeInsets.all(10.0),
|
padding: const EdgeInsets.all(10.0),
|
||||||
child: ListView(children: <Widget>[
|
child: ListView(children: <Widget>[
|
||||||
Center(child: nameWidget(mainModel.customer.name)),
|
Center(child: nameWidget(mainModel.customer.name)),
|
||||||
phoneWidget(context, mainModel.customer.phoneNumber),
|
Center(child: nameWidget(mainModel.customer.phoneNumber)),
|
||||||
Row(
|
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),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 15),
|
||||||
|
ExpansionTile(
|
||||||
|
title: Text('Pickup Location / Time'),
|
||||||
|
children: <Widget>[
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 20.0),
|
||||||
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(right: 8.0),
|
padding: const EdgeInsets.only(right: 8.0),
|
||||||
child: Icon(Icons.location_on),
|
child: Icon(Icons.location_on),
|
||||||
),
|
),
|
||||||
Expanded(child: pickUpAddress),
|
Expanded(
|
||||||
|
child: widget.pickUp == null
|
||||||
|
? pickUpAddress
|
||||||
|
: widget.pickUp.status == 'Pending'
|
||||||
|
? pickUpAddress
|
||||||
|
: pickUpAddressReadOnly),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 25),
|
),
|
||||||
Row(
|
SizedBox(height: 15),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 20.0),
|
||||||
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(right: 8.0),
|
padding: const EdgeInsets.only(right: 8.0),
|
||||||
child: Icon(Icons.timer),
|
child: Icon(Icons.timer),
|
||||||
),
|
),
|
||||||
Text('Pickup Time',
|
Padding(
|
||||||
style: TextStyle(color: Colors.grey, fontSize: 18)),
|
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),
|
SizedBox(height: 5),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 33),
|
padding: const EdgeInsets.only(left: 33),
|
||||||
child: pickupTime,
|
child: widget.pickUp == null
|
||||||
|
? pickupTime
|
||||||
|
: widget.pickUp.status == 'Pending'
|
||||||
|
? pickupTime
|
||||||
|
: pickupTimeReadOnly,
|
||||||
),
|
),
|
||||||
SizedBox(height: 15),
|
],
|
||||||
Row(
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 5),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 20.0),
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
SizedBox(height: 5),
|
||||||
|
Container(height: 50.0, child: requestDateBox)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 10),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
ExpansionTile(
|
||||||
|
title: Text('Package Informations'),
|
||||||
|
children: <Widget>[
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 20.0),
|
||||||
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(right: 8.0),
|
padding: const EdgeInsets.only(right: 8.0),
|
||||||
child: Icon(Octicons.package),
|
child: Icon(Octicons.package),
|
||||||
),
|
),
|
||||||
Expanded(child: noOfPackageBox),
|
Expanded(
|
||||||
|
child: widget.pickUp == null
|
||||||
|
? noOfPackageBox
|
||||||
|
: widget.pickUp.status == 'Pending'
|
||||||
|
? noOfPackageBox
|
||||||
|
: noOfPackageBoxReadonly),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 15,
|
height: 15,
|
||||||
),
|
),
|
||||||
fcsInput("Total Weight (lb)", FontAwesomeIcons.weightHanging),
|
Padding(
|
||||||
SizedBox(
|
padding: const EdgeInsets.only(left: 20.0),
|
||||||
height: 15,
|
child: widget.pickUp == null
|
||||||
|
? fcsInput("Total Weight (lb)",
|
||||||
|
FontAwesomeIcons.weightHanging,
|
||||||
|
controller: _weightEditingController)
|
||||||
|
: widget.pickUp.status == 'Pending'
|
||||||
|
? fcsInput("Total Weight (lb)",
|
||||||
|
FontAwesomeIcons.weightHanging,
|
||||||
|
controller: _weightEditingController)
|
||||||
|
: fcsInputReadOnly("Total Weight (lb)",
|
||||||
|
FontAwesomeIcons.weightHanging,
|
||||||
|
controller: _weightEditingController),
|
||||||
),
|
),
|
||||||
|
SizedBox(height: 15),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 20.0),
|
||||||
|
child: fcsInput("Remark", MaterialCommunityIcons.note),
|
||||||
|
),
|
||||||
|
SizedBox(height: 25),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
ExpansionTile(
|
||||||
|
title: Text('Recipient Informations'),
|
||||||
|
children: <Widget>[
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 20.0),
|
||||||
|
child: widget.pickUp == null
|
||||||
|
? fcsInput("Name", FontAwesomeIcons.user,
|
||||||
|
controller: _recipientNameEditingController)
|
||||||
|
: widget.pickUp.status == 'Pending'
|
||||||
|
? fcsInput("Name", FontAwesomeIcons.user,
|
||||||
|
controller:
|
||||||
|
_recipientNameEditingController)
|
||||||
|
: fcsInputReadOnly(
|
||||||
|
"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,
|
||||||
|
controller: _recipientPhoneEditingController)
|
||||||
|
: widget.pickUp.status == 'Pending'
|
||||||
|
? fcsInput(
|
||||||
|
"Phone Number", FontAwesomeIcons.phone,
|
||||||
|
controller:
|
||||||
|
_recipientPhoneEditingController)
|
||||||
|
: fcsInputReadOnly(
|
||||||
|
"Phone Number", FontAwesomeIcons.phone,
|
||||||
|
controller:
|
||||||
|
_recipientPhoneEditingController)),
|
||||||
|
SizedBox(height: 25),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 20.0),
|
||||||
|
child: widget.pickUp == null
|
||||||
|
? fcsInput("Address", Icons.location_on,
|
||||||
|
controller:
|
||||||
|
_recipientAddressEditingController)
|
||||||
|
: widget.pickUp.status == 'Pending'
|
||||||
|
? fcsInput("Address", Icons.location_on,
|
||||||
|
controller:
|
||||||
|
_recipientAddressEditingController)
|
||||||
|
: fcsInputReadOnly(
|
||||||
|
"Address", Icons.location_on,
|
||||||
|
controller:
|
||||||
|
_recipientAddressEditingController)),
|
||||||
|
SizedBox(height: 25),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
ExpansionTile(
|
||||||
|
title: Text('For FCS'),
|
||||||
|
children: <Widget>[
|
||||||
widget.pickUp != null
|
widget.pickUp != null
|
||||||
? fcsDropDown("Assigned", MaterialCommunityIcons.worker)
|
? widget.pickUp.status == 'Pending'
|
||||||
|
? Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 20.0),
|
||||||
|
child: fcsDropDown("Assigned",
|
||||||
|
MaterialCommunityIcons.worker),
|
||||||
|
)
|
||||||
|
: Container()
|
||||||
: Container(),
|
: Container(),
|
||||||
fcsInput("Remark", MaterialCommunityIcons.note)
|
SizedBox(
|
||||||
|
height: 25,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
]),
|
]),
|
||||||
)),
|
)),
|
||||||
widget.pickUp == null
|
widget.pickUp == null
|
||||||
@@ -233,7 +457,22 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
|||||||
: Container(
|
: Container(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Align(
|
widget.pickUp.status == 'Assigned'
|
||||||
|
? Align(
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
width: 250,
|
||||||
|
child: FlatButton(
|
||||||
|
child: Text('Complete'),
|
||||||
|
color: primaryColor,
|
||||||
|
textColor: Colors.white,
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)))
|
||||||
|
: Align(
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'package:fcs/model/pickup_model.dart';
|
|||||||
import 'package:fcs/pages/pickup_editor.dart';
|
import 'package:fcs/pages/pickup_editor.dart';
|
||||||
import 'package:fcs/vo/pickup.dart';
|
import 'package:fcs/vo/pickup.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_icons/flutter_icons.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:fcs/model/buyer_model.dart';
|
import 'package:fcs/model/buyer_model.dart';
|
||||||
import 'package:fcs/pages/util.dart';
|
import 'package:fcs/pages/util.dart';
|
||||||
@@ -56,6 +57,12 @@ class _PickupListRowState extends State<PickupListRow> {
|
|||||||
padding: const EdgeInsets.symmetric(vertical: 16.0),
|
padding: const EdgeInsets.symmetric(vertical: 16.0),
|
||||||
child: new Row(
|
child: new Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(5.0),
|
||||||
|
child: Icon(
|
||||||
|
MaterialCommunityIcons.directions,
|
||||||
|
color: primaryColor,
|
||||||
|
)),
|
||||||
new Expanded(
|
new Expanded(
|
||||||
child: new Column(
|
child: new Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -71,7 +78,9 @@ class _PickupListRowState extends State<PickupListRow> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 10.0, top: 10),
|
padding: const EdgeInsets.only(left: 10.0, top: 10),
|
||||||
child: new Text(
|
child: new Text(
|
||||||
_pickUp.id == null ? '' : "Last ${_pickUp.last} days" ,
|
_pickUp.id == null
|
||||||
|
? ''
|
||||||
|
: "Last ${_pickUp.last} days",
|
||||||
style: new TextStyle(
|
style: new TextStyle(
|
||||||
fontSize: 15.0, color: Colors.grey),
|
fontSize: 15.0, color: Colors.grey),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -284,24 +284,7 @@ class _ProfileState extends State<Profile> {
|
|||||||
),
|
),
|
||||||
backgroundColor: primaryColor,
|
backgroundColor: primaryColor,
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
IconButton(
|
|
||||||
icon: Icon(Icons.edit),
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(builder: (context) => ProfileEdit()),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
IconButton(
|
|
||||||
icon: Icon(Icons.settings),
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(builder: (context) => ProfileSetting()),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: ListView(
|
body: ListView(
|
||||||
@@ -310,8 +293,16 @@ class _ProfileState extends State<Profile> {
|
|||||||
right: 25.0,
|
right: 25.0,
|
||||||
),
|
),
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
|
children: <Widget>[
|
||||||
|
Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
namebox,
|
namebox,
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left:18.0),
|
||||||
|
child: Icon(Icons.edit),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
mainModel.isBuyer() ? Container() : getPrivilegeBox(context),
|
mainModel.isBuyer() ? Container() : getPrivilegeBox(context),
|
||||||
phonenumberbox,
|
phonenumberbox,
|
||||||
mainModel.user == null
|
mainModel.user == null
|
||||||
@@ -320,20 +311,8 @@ class _ProfileState extends State<Profile> {
|
|||||||
? Container()
|
? Container()
|
||||||
: emailBox,
|
: emailBox,
|
||||||
languageBox,
|
languageBox,
|
||||||
|
SizedBox(height: 50,),
|
||||||
logoutbutton,
|
logoutbutton,
|
||||||
Divider(color: secondaryColor),
|
|
||||||
Switch(
|
|
||||||
value: false,
|
|
||||||
onChanged: (value) {
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
// activeTrackColor: Colors.lightGreenAccent,
|
|
||||||
// activeColor: Colors.green,
|
|
||||||
),
|
|
||||||
versionbox,
|
|
||||||
SizedBox(
|
|
||||||
height: 20,
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ class _StaffListState extends State<StaffList> {
|
|||||||
padding: new EdgeInsets.symmetric(
|
padding: new EdgeInsets.symmetric(
|
||||||
horizontal: 32.0 - dotSize / 2),
|
horizontal: 32.0 - dotSize / 2),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
SimpleLineIcons.people,
|
MaterialCommunityIcons.worker,
|
||||||
color: primaryColor,
|
color: primaryColor,
|
||||||
size: 40,
|
size: 40,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -51,12 +51,14 @@ class _TermState extends State<Term> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
MainModel mainModel = Provider.of<MainModel>(context);
|
MainModel mainModel = Provider.of<MainModel>(context);
|
||||||
|
print("controller terms => ${_controller.document}");
|
||||||
|
|
||||||
bool isOwnerAndAbove =
|
bool isOwnerAndAbove =
|
||||||
mainModel.user != null && mainModel.user.isOwnerAndAbove();
|
mainModel.user != null && mainModel.user.isOwnerAndAbove();
|
||||||
bool hasAdmin = mainModel.user != null && mainModel.user.hasAdmin();
|
bool hasAdmin = mainModel.user != null && mainModel.user.hasAdmin();
|
||||||
|
|
||||||
bool aggreed = mainModel.user.agreeTerms;
|
// bool aggreed = mainModel.user.agreeTerms;
|
||||||
|
bool aggreed = true;
|
||||||
|
|
||||||
final agreeBtn = Padding(
|
final agreeBtn = Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.0),
|
padding: EdgeInsets.symmetric(vertical: 10.0),
|
||||||
@@ -86,9 +88,9 @@ class _TermState extends State<Term> {
|
|||||||
inAsyncCall: isLoading,
|
inAsyncCall: isLoading,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
centerTitle: true,
|
||||||
automaticallyImplyLeading: !widget.agreePage,
|
automaticallyImplyLeading: !widget.agreePage,
|
||||||
title: LocalText(context, 'term.title',
|
title: LocalText(context, 'term', color: Colors.white, fontSize: 20),
|
||||||
color: Colors.white, fontSize: 20),
|
|
||||||
backgroundColor: primaryColor,
|
backgroundColor: primaryColor,
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
isOwnerAndAbove || hasAdmin
|
isOwnerAndAbove || hasAdmin
|
||||||
@@ -111,8 +113,7 @@ class _TermState extends State<Term> {
|
|||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Card(
|
child: Card(
|
||||||
child: ZefyrTheme(
|
child: ZefyrTheme(
|
||||||
data: ZefyrThemeData().copyWith(
|
data: ZefyrThemeData().copyWith(),
|
||||||
),
|
|
||||||
child: ZefyrScaffold(
|
child: ZefyrScaffold(
|
||||||
child: ZefyrEditor(
|
child: ZefyrEditor(
|
||||||
mode: ZefyrMode.view,
|
mode: ZefyrMode.view,
|
||||||
@@ -134,13 +135,13 @@ class _TermState extends State<Term> {
|
|||||||
isLoading = true;
|
isLoading = true;
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
MainModel mainModel = Provider.of<MainModel>(context);
|
// MainModel mainModel = Provider.of<MainModel>(context);
|
||||||
await mainModel.agreeTerms();
|
// await mainModel.agreeTerms();
|
||||||
if (widget.agreePage) {
|
// if (widget.agreePage) {
|
||||||
Future.delayed(const Duration(milliseconds: 3000), () {
|
// Future.delayed(const Duration(milliseconds: 3000), () {
|
||||||
Navigator.pop(context);
|
// Navigator.pop(context);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showMsgDialog(context, "Error", e.toString());
|
showMsgDialog(context, "Error", e.toString());
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|||||||
@@ -92,8 +92,7 @@ class _TermEditState extends State<TermEdit> {
|
|||||||
),
|
),
|
||||||
body: ZefyrScaffold(
|
body: ZefyrScaffold(
|
||||||
child: ZefyrTheme(
|
child: ZefyrTheme(
|
||||||
data: ZefyrThemeData().copyWith(
|
data: ZefyrThemeData().copyWith(),
|
||||||
),
|
|
||||||
child: ZefyrEditor(
|
child: ZefyrEditor(
|
||||||
padding: EdgeInsets.all(16),
|
padding: EdgeInsets.all(16),
|
||||||
controller: _controller,
|
controller: _controller,
|
||||||
|
|||||||
@@ -401,6 +401,8 @@ Widget fcsInput(String label, IconData iconData,
|
|||||||
initialValue: value,
|
initialValue: value,
|
||||||
controller: controller,
|
controller: controller,
|
||||||
cursorColor: primaryColor,
|
cursorColor: primaryColor,
|
||||||
|
maxLines: null,
|
||||||
|
minLines: 1,
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
decoration: new InputDecoration(
|
decoration: new InputDecoration(
|
||||||
contentPadding: EdgeInsets.only(top: 8),
|
contentPadding: EdgeInsets.only(top: 8),
|
||||||
@@ -418,6 +420,38 @@ Widget fcsInput(String label, IconData iconData,
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget fcsInputReadOnly(String label, IconData iconData,
|
||||||
|
{TextEditingController controller, String value}) {
|
||||||
|
return Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(right: 8.0),
|
||||||
|
child: Icon(iconData),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: Row(children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: TextFormField(
|
||||||
|
initialValue: value,
|
||||||
|
controller: controller,
|
||||||
|
cursorColor: primaryColor,
|
||||||
|
maxLines: null,
|
||||||
|
minLines: 1,
|
||||||
|
readOnly: true,
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
decoration: new InputDecoration(
|
||||||
|
border: InputBorder.none,
|
||||||
|
contentPadding: EdgeInsets.only(top: 8),
|
||||||
|
labelText: label,
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
]),
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget fcsDropDown(String label, IconData iconData,
|
Widget fcsDropDown(String label, IconData iconData,
|
||||||
{TextEditingController controller}) {
|
{TextEditingController controller}) {
|
||||||
return Row(
|
return Row(
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
import 'package:fcs/model/main_model.dart';
|
import 'package:fcs/model/main_model.dart';
|
||||||
import 'package:fcs/model/pickup_model.dart';
|
import 'package:fcs/model/pickup_model.dart';
|
||||||
import 'package:fcs/pages/util.dart';
|
|
||||||
import 'package:fcs/vo/package.dart';
|
import 'package:fcs/vo/package.dart';
|
||||||
import 'package:fcs/vo/pickup.dart';
|
import 'package:fcs/widget/localization/app_translations.dart';
|
||||||
import 'package:flutter_icons/flutter_icons.dart';
|
import 'package:fcs/widget/progress.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:fcs/widget/localization/app_translations.dart';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:fcs/widget/progress.dart';
|
|
||||||
|
|
||||||
import '../theme/theme.dart';
|
import '../theme/theme.dart';
|
||||||
|
|
||||||
@@ -53,100 +49,6 @@ class _PackageEditorState extends State<PackageEditor> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
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',
|
|
||||||
enabledBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
|
||||||
focusedBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
|
||||||
),
|
|
||||||
));
|
|
||||||
|
|
||||||
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 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 weightBox = Container(
|
|
||||||
height: 50.0,
|
|
||||||
child: Row(children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
child: TextFormField(
|
|
||||||
controller: _weightEditingController,
|
|
||||||
cursorColor: primaryColor,
|
|
||||||
textAlign: TextAlign.left,
|
|
||||||
decoration: new InputDecoration(
|
|
||||||
labelText: 'Total Weight (lb)',
|
|
||||||
enabledBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
|
||||||
focusedBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
]),
|
|
||||||
);
|
|
||||||
|
|
||||||
MainModel mainModel = Provider.of<MainModel>(context);
|
|
||||||
|
|
||||||
return LocalProgress(
|
return LocalProgress(
|
||||||
inAsyncCall: _isLoading,
|
inAsyncCall: _isLoading,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
@@ -198,7 +100,7 @@ class _PackageEditorState extends State<PackageEditor> {
|
|||||||
icon: Icon(Icons.pages)
|
icon: Icon(Icons.pages)
|
||||||
// prefixIcon: Icon(Icons.play_arrow)
|
// prefixIcon: Icon(Icons.play_arrow)
|
||||||
),
|
),
|
||||||
items: ["A102", "A103"]
|
items: ["General", "Medicine", "Dangerous"]
|
||||||
.map((e) => DropdownMenuItem(child: Text(e), value: e))
|
.map((e) => DropdownMenuItem(child: Text(e), value: e))
|
||||||
.toList(),
|
.toList(),
|
||||||
onChanged: (map) => {},
|
onChanged: (map) => {},
|
||||||
@@ -214,6 +116,28 @@ class _PackageEditorState extends State<PackageEditor> {
|
|||||||
FontAwesomeIcons.weightHanging,
|
FontAwesomeIcons.weightHanging,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
|
TextFormField(
|
||||||
|
initialValue: "0",
|
||||||
|
textAlign: TextAlign.end,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
fillColor: Colors.white,
|
||||||
|
labelText: 'Rate',
|
||||||
|
filled: true,
|
||||||
|
icon: Icon(
|
||||||
|
FontAwesomeIcons.tag,
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
TextFormField(
|
||||||
|
initialValue: "0",
|
||||||
|
textAlign: TextAlign.end,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
fillColor: Colors.white,
|
||||||
|
labelText: 'Amount',
|
||||||
|
filled: true,
|
||||||
|
icon: Icon(
|
||||||
|
FontAwesomeIcons.moneyBill,
|
||||||
|
),
|
||||||
|
)),
|
||||||
TextFormField(
|
TextFormField(
|
||||||
initialValue: "P0203",
|
initialValue: "P0203",
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class FCSTextField extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return TextFormField(
|
return TextFormField(
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
|
minLines: 1,
|
||||||
controller: controller,
|
controller: controller,
|
||||||
cursorColor: primaryColor,
|
cursorColor: primaryColor,
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
|
|||||||
27
lib/widget/fcs_text_field_readonly.dart
Normal file
27
lib/widget/fcs_text_field_readonly.dart
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../theme/theme.dart';
|
||||||
|
|
||||||
|
class FCSTextFieldReadOnly extends StatelessWidget {
|
||||||
|
final TextEditingController controller;
|
||||||
|
final String label;
|
||||||
|
|
||||||
|
const FCSTextFieldReadOnly({Key key, this.controller, this.label})
|
||||||
|
: super(key: key);
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return TextFormField(
|
||||||
|
maxLines: null,
|
||||||
|
minLines: 2,
|
||||||
|
controller: controller,
|
||||||
|
cursorColor: primaryColor,
|
||||||
|
readOnly: true,
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
border: InputBorder.none,
|
||||||
|
labelText: label,
|
||||||
|
contentPadding: EdgeInsets.all(10.0),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -120,6 +120,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.15"
|
version: "1.3.15"
|
||||||
|
country_icons:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: country_icons
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.1"
|
||||||
crypto:
|
crypto:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ dependencies:
|
|||||||
country_code_picker: ^1.3.12
|
country_code_picker: ^1.3.12
|
||||||
pin_input_text_field:
|
pin_input_text_field:
|
||||||
flutter_icons: ^1.1.0
|
flutter_icons: ^1.1.0
|
||||||
|
country_icons: ^1.1.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Reference in New Issue
Block a user