From a08e73e537bb898a6086189c398ba9ef3f391a52 Mon Sep 17 00:00:00 2001 From: sainw Date: Fri, 29 May 2020 15:53:37 +0630 Subject: [PATCH 1/2] update theme --- android/.project | 17 ++ .../org.eclipse.buildship.core.prefs | 13 + android/app/.classpath | 6 + android/app/.project | 23 ++ .../org.eclipse.buildship.core.prefs | 2 + assets/logo.jpg | Bin 0 -> 16092 bytes lib/main-dev.dart | 2 +- lib/pages/home_page.dart | 224 ++++++++++++------ lib/pages/profile_page.dart | 11 +- lib/theme/theme.dart | 4 +- 10 files changed, 226 insertions(+), 76 deletions(-) create mode 100644 android/.project create mode 100644 android/.settings/org.eclipse.buildship.core.prefs create mode 100644 android/app/.classpath create mode 100644 android/app/.project create mode 100644 android/app/.settings/org.eclipse.buildship.core.prefs create mode 100644 assets/logo.jpg diff --git a/android/.project b/android/.project new file mode 100644 index 0000000..3964dd3 --- /dev/null +++ b/android/.project @@ -0,0 +1,17 @@ + + + android + Project android created by Buildship. + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/android/.settings/org.eclipse.buildship.core.prefs b/android/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..d19d611 --- /dev/null +++ b/android/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,13 @@ +arguments= +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) +connection.project.dir= +eclipse.preferences.version=1 +gradle.user.home= +java.home=/usr/lib/jvm/java-8-openjdk-amd64 +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/android/app/.classpath b/android/app/.classpath new file mode 100644 index 0000000..eb19361 --- /dev/null +++ b/android/app/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/android/app/.project b/android/app/.project new file mode 100644 index 0000000..ac485d7 --- /dev/null +++ b/android/app/.project @@ -0,0 +1,23 @@ + + + app + Project app created by Buildship. + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/android/app/.settings/org.eclipse.buildship.core.prefs b/android/app/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..b1886ad --- /dev/null +++ b/android/app/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +connection.project.dir=.. +eclipse.preferences.version=1 diff --git a/assets/logo.jpg b/assets/logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2df4aa2a5b11e6d57dc8682469d33acd1d86133e GIT binary patch literal 16092 zcmb`u1z225vnV>a!{F`^+$FfXJAnk3;O_43?(Xgm2@ss%PJrO9!GeT0u=hUuKlh#Y zzI(s#E?~N;Rb5qGx_Wib%hJnF08mCkS^@wD4gi3GegH40fGj05TPIsbGg~_nHb!Ou zmx#1HBqZSV@*@EM48V|KH`h~BvUO&*bXVbGw=uG?QdS@Urv?~Gh{%gEvoJF=8yK-M zvw>P>HdAJU*OrTwcuays?R+5$N_4=ug+k&cO+! z%1@v^f~%9=Yu^mi$1t>f>wCTS9Y6wt;Bl}0&wurc-f;fvx4q%0sfdDb#zB3d&;QXk z{EzHWa0*r9{`XL0RUcg`WN+ob@eX{0t+Mp8^{(#|H5nw006EV z5IpW*m|;2q&>9Q?;H>-$qsRjQP=Ww}mPsRL2baHi0PsNV7}yAe5mW-KCBiLG5K|eS zo%E6>junSDK>|wIRp->w&I2mEKEtcZ{EPQ&{~`0s%gZW26aWng1q}rW4Gjei0|N~U z4}^z@gM-IFMnME(W8mOmV_;$75mFN4;gb_!VUf_2kiVm%p{2nkW?*KZW~QX3p?)O- z1_J{F4-1bD506fbhlNM|e|)|40Z?JV9KakP0Av6#R4{NXi4V-0C5p{53%n{p=OIk3&JYRzPZR=VZ?5sZgZj`X3;(;+{<*fE z0#n+k86LYcH@j)<0YMs#ko{9%?jQRWHl;TIj^xYg|Dm%dpsK_W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d;aPw5>@XONk1SDp5V_dHX5(h&LOS9 zjwZ30K?qT1c0c-m7XcG}Tn_}*B*6*k>R-@zY>x@7r$iD()$5XnRYL5>XIj=K6X z`YWs#d~ { @override Widget build(BuildContext context) { - final helpBtn = _buildBtn("manual.title", + final helpBtn = _buildBtn2("manual.title", + icon: FontAwesomeIcons.readme, imgIcon: Image.asset( "assets/manual.png", width: 40, @@ -100,7 +88,7 @@ class _HomePageState extends State { // btnCallback: () => Navigator.of(context) // .push(MaterialPageRoute(builder: (_) => TestList())) ); - final announcementBtn = _buildBtn("announcement.title", + final announcementBtn = _buildBtn2("announcement.title", icon: Icons.announcement, btnCallback: () => Navigator.of(context) .push(MaterialPageRoute(builder: (_) => AnnouncementList()))); @@ -115,7 +103,8 @@ class _HomePageState extends State { btnCallback: () => Navigator.of(context) .push(MaterialPageRoute(builder: (_) => BuyerList()))); - final reportBtn = _buildBtn("report.title", + final reportBtn = _buildBtn2("report.title", + icon: FontAwesomeIcons.paperPlane, imgIcon: Image.asset( "assets/report.png", width: 50, @@ -193,7 +182,8 @@ class _HomePageState extends State { btnCallback: () => Navigator.of(context) .push(MaterialPageRoute(builder: (_) => EmployeeList()))); - final termBtn = _buildBtn("term.title", + final termBtn = _buildBtn2("term.title", + icon: FontAwesomeIcons.fileContract, imgIcon: Image.asset( "assets/term.png", width: 40, @@ -219,7 +209,7 @@ class _HomePageState extends State { ); }); - final _bankAccountsBtn = _buildBtn("banks.title", + final _bankAccountsBtn = _buildBtn2("banks.title", icon: FontAwesomeIcons.moneyCheck, btnCallback: () { Navigator.push( context, @@ -227,7 +217,6 @@ class _HomePageState extends State { ); }); - List widgets = [helpBtn]; widgets.add(announcementBtn); widgets.add(reportBtn); @@ -341,10 +330,11 @@ class _HomePageState extends State { child: FlavorBanner( child: Scaffold( appBar: AppBar( + elevation: 0, backgroundColor: primaryColor, title: ClipRRect( - child: Image.asset("assets/logo.png", height: 40), - borderRadius: new BorderRadius.circular(15.0), + child: Image.asset("assets/logo.jpg", height: 40), + borderRadius: new BorderRadius.circular(35.0), ), actions: [ IconButton( @@ -355,7 +345,7 @@ class _HomePageState extends State { ); }, iconSize: 30, - icon: Icon(Icons.phone), + icon: Icon(Icons.notifications), ), IconButton( onPressed: () { @@ -365,53 +355,99 @@ class _HomePageState extends State { ); }, iconSize: 30, - icon: Icon(Icons.account_circle), + icon: Icon(Icons.tune), ), ]), - body: StaggeredGridView.count( - crossAxisCount: 3, - crossAxisSpacing: 12.0, - mainAxisSpacing: 12.0, - padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), - children: [ - _buildTile( - Padding( - padding: const EdgeInsets.all(20.0), - child: productListBox, - ), - onTap: () => Navigator.of(context) - .push(MaterialPageRoute(builder: (_) => ProductsList())), - ), - new GridView.count( - shrinkWrap: true, - scrollDirection: Axis.horizontal, - crossAxisCount: 1, - crossAxisSpacing: 12, - mainAxisSpacing: 12, - padding: EdgeInsets.only(bottom: 5, left: 10, right: 5), - children: widgets, - ), - _buildTile( - PageView( - children: chartWidgets, + body: Container( + decoration: BoxDecoration( + gradient: + // RadialGradient( + // center: const Alignment(-0.7, 0.6), // near the top right + // radius: 0.6, + // colors: [ + // secondaryColor, + // primaryColor, // yellow sun + // ], + // stops: [0.4, 1.0], + // ) + // LinearGradient( + // begin: Alignment.topCenter, + // end: Alignment + // .bottomCenter, // 10% of the width, so there are ten blinds. + // colors: [ + // Color(0xd0272262), + // Color(0xfa272262), + // ], // whitish to gray + // ), + SweepGradient( + center: FractionalOffset.centerLeft, + startAngle: 0.0, + endAngle: math.pi * 2, + colors: const [ + secondaryColor, + primaryColor, + secondaryColor, + primaryColor, + secondaryColor, + ], + stops: const [0.0, 0.25, 0.5, 0.75, 1.0], ), ), - ], - staggeredTiles: [ - StaggeredTile.extent(5, 110.0), - StaggeredTile.extent(3, 110.0), - StaggeredTile.extent(3, 250.0), - ], - )), + child: ListView(children: [ + Wrap( + children: widgets, + ), + ]) + // child: StaggeredGridView.count( + // crossAxisCount: 3, + // crossAxisSpacing: 12.0, + // mainAxisSpacing: 12.0, + // padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), + // children: [ + // _buildTile( + // Padding( + // padding: const EdgeInsets.all(20.0), + // child: productListBox, + // ), + // onTap: () => Navigator.of(context).push( + // MaterialPageRoute(builder: (_) => ProductsList())), + // ), + // new GridView.count( + // shrinkWrap: true, + // scrollDirection: Axis.horizontal, + // crossAxisCount: 1, + // crossAxisSpacing: 12, + // mainAxisSpacing: 12, + // padding: EdgeInsets.only(bottom: 5, left: 10, right: 5), + // children: widgets, + // ), + // Container( + // color:Colors.red + // ), + + // _buildTile( + // PageView( + // children: chartWidgets, + // ), + // ), + // ], + // staggeredTiles: [ + // StaggeredTile.extent(5, 110.0), + // StaggeredTile.extent(3, 110.0), + // StaggeredTile.extent(3, 250.0), + // ], + // ), + )), ), ); } Widget _buildTile(Widget child, {Function() onTap}) { return Material( - elevation: 30.0, + elevation: 0, borderRadius: BorderRadius.circular(12.0), - shadowColor: Color(0x802196F3), + // shadowColor: Colors.transparent, + color: Colors.transparent, child: InkWell( onTap: onTap != null ? () => onTap() @@ -458,12 +494,56 @@ class _HomePageState extends State { ); } - _showNotifications() async { - if (!super.mounted) return; - await Navigator.push( - context, - MaterialPageRoute(builder: (context) => NotificationList()), + Widget _buildBtn2(String title, + {Image imgIcon, IconData icon, BtnCallback btnCallback}) { + var languageModel = Provider.of(context); + return Container( + width: 130, + height: 130, + decoration: new BoxDecoration( + color: Colors.transparent, //new Color.fromRGBO(255, 0, 0, 0.0), + borderRadius: new BorderRadius.only( + topLeft: const Radius.circular(40.0), + topRight: const Radius.circular(40.0))), + // color: Colors.transparent, + child: Padding( + padding: const EdgeInsets.all(5.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + // Padding( + // padding: EdgeInsets.only(top: 10), + // child: Icon(icon, color: Colors.white, size: 35.0)), + // Padding(padding: EdgeInsets.only(bottom: 10.0)), + ClipOval( + child: Material( + color: Colors.white, // button color + child: InkWell( + splashColor: secondaryColor, // inkwell color + child: SizedBox(width: 60, height: 60, child: Icon(icon,size:35)), + onTap: btnCallback, + ), + ), + ), + + Text(AppTranslations.of(context).text(title), + style: + // languageModel.isEng + // ? + TextStyle( + color: Colors.white, + fontWeight: FontWeight.normal, + fontSize: 16.0, + fontFamily: "Roboto") + // : TextStyle( + // color: Colors.black, + // fontWeight: FontWeight.w700, + // fontSize: 12.0, + // fontFamily: "MyanmarUnicode") + ), + ]), + ), ); - // Provider.of(context, listen: false).seen(); } } diff --git a/lib/pages/profile_page.dart b/lib/pages/profile_page.dart index a0e0c83..b7ec792 100644 --- a/lib/pages/profile_page.dart +++ b/lib/pages/profile_page.dart @@ -94,6 +94,7 @@ class _ProfileState extends State { ], ), )); + final phonenumberbox = Container( height: 45.0, child: Row( @@ -319,6 +320,14 @@ class _ProfileState extends State { languageBox, logoutbutton, Divider(color: secondaryColor), + Switch( + value: false, + onChanged: (value) { + setState(() {}); + }, + // activeTrackColor: Colors.lightGreenAccent, + // activeColor: Colors.green, + ), versionbox, SizedBox( height: 20, @@ -332,7 +341,7 @@ class _ProfileState extends State { Widget getPrivilegeBox(BuildContext context) { var languageModel = Provider.of(context); var userModel = Provider.of(context); - + return ListTileTheme( contentPadding: EdgeInsets.all(0), child: ExpansionTile( diff --git a/lib/theme/theme.dart b/lib/theme/theme.dart index 373f602..2b48844 100644 --- a/lib/theme/theme.dart +++ b/lib/theme/theme.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'dart:ui'; import 'package:flutter/cupertino.dart'; -const primaryColor = const Color(0xfff00a21); -const secondaryColor = const Color(0xFF0815f1); +const primaryColor = const Color(0xff272262); +const secondaryColor = const Color(0xffff4400); const thirdColor = const Color(0xFF0700f1); const nextColor = const Color(0xFFfa833d); const buttonColor = const Color(0xFFFFFFFF); From df0fd209e884af5c59042af1e954b8a37fdd2c2a Mon Sep 17 00:00:00 2001 From: PhyoThandar Date: Fri, 29 May 2020 15:54:26 +0630 Subject: [PATCH 2/2] add page of fcs --- assets/local/localization_en.json | 6 +- assets/local/localization_mu.json | 6 +- lib/app.dart | 10 +- lib/model/pickup_model.dart | 69 ++++ lib/model/shipment_rate_model.dart | 34 ++ lib/pages/calculate_shipment_cost_editor.dart | 255 +++++++++++++++ lib/pages/fcs_profile_page.dart | 201 ++++++++++++ lib/pages/home_page.dart | 22 +- lib/pages/pickup_editor.dart | 237 ++++++++++++++ lib/pages/pickup_list.dart | 170 ++++++++++ lib/pages/pickup_list_row.dart | 117 +++++++ lib/pages/shipment_rates.dart | 305 ++++++++++++++++++ lib/pages/util.dart | 22 +- lib/vo/fcs_profile.dart | 19 ++ lib/vo/pickup.dart | 40 +++ lib/vo/rate.dart | 31 ++ lib/widget/fcs_text_field.dart | 27 ++ 17 files changed, 1561 insertions(+), 10 deletions(-) create mode 100644 lib/model/pickup_model.dart create mode 100644 lib/model/shipment_rate_model.dart create mode 100644 lib/pages/calculate_shipment_cost_editor.dart create mode 100644 lib/pages/fcs_profile_page.dart create mode 100644 lib/pages/pickup_editor.dart create mode 100644 lib/pages/pickup_list.dart create mode 100644 lib/pages/pickup_list_row.dart create mode 100644 lib/pages/shipment_rates.dart create mode 100644 lib/vo/fcs_profile.dart create mode 100644 lib/vo/pickup.dart create mode 100644 lib/vo/rate.dart create mode 100644 lib/widget/fcs_text_field.dart diff --git a/assets/local/localization_en.json b/assets/local/localization_en.json index 6460c9b..7bf4095 100644 --- a/assets/local/localization_en.json +++ b/assets/local/localization_en.json @@ -463,5 +463,9 @@ "announcement.name":"Subject", "announcement.name_empty":"Please enter subject", "announcement.delete_confirm":"Delete announcement?", - "announcement.desc":"Description" + "announcement.desc":"Description", + + "pickup.title": "Pickups", + "pickup.new": "New Pickup", + "pickup.edit.title": "Pickup" } \ No newline at end of file diff --git a/assets/local/localization_mu.json b/assets/local/localization_mu.json index 2842df0..789f525 100644 --- a/assets/local/localization_mu.json +++ b/assets/local/localization_mu.json @@ -496,5 +496,9 @@ "announcement.name":"အကြောင်းအရာ", "announcement.name_empty":"ကျေးဇူးပြု၍ အကြောင်းအရာ အမည်ပေးပါ", "announcement.delete_confirm":"ကြေငြာချက်ကိုဖျက်မည်လား?", - "announcement.desc":"ဖော်ပြချက်" + "announcement.desc":"ဖော်ပြချက်", + + "pickup.title": "Pickups", + "pickup.new": "New Pickup", + "pickup.edit.title": "Pickup" } \ No newline at end of file diff --git a/lib/app.dart b/lib/app.dart index 320de7a..613dabf 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -21,9 +21,11 @@ import 'model/employee_model.dart'; import 'model/language_model.dart'; import 'model/log_model.dart'; import 'model/main_model.dart'; +import 'model/pickup_model.dart'; import 'model/po_model.dart'; import 'model/product_model.dart'; import 'model/report_user_model.dart'; +import 'model/shipment_rate_model.dart'; import 'model/user_model.dart'; import 'pages/home_page.dart'; import 'pages/splash.dart'; @@ -59,6 +61,8 @@ class _AppState extends State { final ReportModel reportModel = new ReportModel(); final AnnouncementModel announcementModel = new AnnouncementModel(); final ReportUserModel reportUserModel = new ReportUserModel(); + final PickUpModel pickUpModel = new PickUpModel(); + final ShipmentRateModel shipmentRateModel = new ShipmentRateModel(); AppTranslationsDelegate _newLocaleDelegate; @@ -88,7 +92,9 @@ class _AppState extends State { ..addModel(announcementModel) ..addModel(reportModel) ..addModel(testModel) - ..addModel(reportUserModel); + ..addModel(reportUserModel) + ..addModel(pickUpModel) + ..addModel(shipmentRateModel); this.mainModel.init(); } @@ -137,6 +143,8 @@ class _AppState extends State { ChangeNotifierProvider(builder: (context) => reportModel), ChangeNotifierProvider(builder: (context) => announcementModel), ChangeNotifierProvider(builder: (context) => reportUserModel), + ChangeNotifierProvider(builder: (context) => pickUpModel), + ChangeNotifierProvider(builder: (context) => shipmentRateModel), ChangeNotifierProvider( builder: (context) => testModel, ), diff --git a/lib/model/pickup_model.dart b/lib/model/pickup_model.dart new file mode 100644 index 0000000..08a2920 --- /dev/null +++ b/lib/model/pickup_model.dart @@ -0,0 +1,69 @@ +import 'dart:async'; + +import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:fcs/vo/fcs_profile.dart'; +import 'package:fcs/vo/pickup.dart'; +import 'package:logging/logging.dart'; + +import 'base_model.dart'; + +class PickUpModel extends BaseModel { + final log = Logger('PickUpModel'); + + StreamSubscription listener; + + var profile = FCSProfile( + id: '1', + usaAddress: '154-19 64th Ave.\nFlushing, NY 11367\nTEL. +1 (929) 215-2247', + mmAddress: 'FCS Trading Myanmar\nRoom 333, Yangon', + usaContactNumber: '1 (929) 215-2247', + mmContactNumber: '+95 9 700224723', + mail: 'admin@fcs.com', + facebook: 'https://facebook.com/fcs'); + + List pickups = [ + PickUp( + id: "P200412 - 12 Apr 2020", + userName: "Ko Kyaw Nyi", + phoneNumber: '+959111111111', + fromTime: '1PM', + toTime: '3PM', + numberOfPackage: 5, + weight: 25, + status: 'pickup', + address: + '154-19 64th Ave.\nFlushing, NY 11367\nTEL. +1 (929) 215-2247'), + PickUp( + id: "P200125 - 12 May 2020", + userName: "Ko Kyaw Nyi", + phoneNumber: '+959111111111', + fromTime: '1PM', + toTime: '3PM', + numberOfPackage: 5, + weight: 25, + status: 'pickup', + address: + '154-19 64th Ave.\nFlushing, NY 11367\nTEL. +1 (929) 215-2247'), + PickUp( + id: "P200441 - 13 Apr 2020", + userName: "Ko Kyaw Nyi", + phoneNumber: '+959111111111', + fromTime: '1PM', + toTime: '3PM', + numberOfPackage: 5, + weight: 25, + status: "delivered", + address: + '154-19 64th Ave.\nFlushing, NY 11367\nTEL. +1 (929) 215-2247'), + ]; + + void initUser(user) { + super.initUser(user); + } + + @override + logout() async { + if (listener != null) await listener.cancel(); + pickups = []; + } +} diff --git a/lib/model/shipment_rate_model.dart b/lib/model/shipment_rate_model.dart new file mode 100644 index 0000000..0df3e3e --- /dev/null +++ b/lib/model/shipment_rate_model.dart @@ -0,0 +1,34 @@ +import 'dart:async'; + +import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:fcs/vo/rate.dart'; +import 'package:logging/logging.dart'; + +import 'base_model.dart'; + +class ShipmentRateModel extends BaseModel { + final log = Logger('ShipmentRateModel'); + + StreamSubscription listener; + + List rates = [ + Rate( + id: '1', name: 'general_cargo', description: 'General Cargo', price: 6), + Rate(id: '2', name: 'medicine', description: 'Medicine', price: 7), + Rate( + id: '3', + name: 'dangerous_cargo', + description: 'Dangerous Cargo', + price: 8), + ]; + + void initUser(user) { + super.initUser(user); + } + + @override + logout() async { + if (listener != null) await listener.cancel(); + rates = []; + } +} diff --git a/lib/pages/calculate_shipment_cost_editor.dart b/lib/pages/calculate_shipment_cost_editor.dart new file mode 100644 index 0000000..955191c --- /dev/null +++ b/lib/pages/calculate_shipment_cost_editor.dart @@ -0,0 +1,255 @@ +import 'package:fcs/model/pickup_model.dart'; +import 'package:fcs/vo/pickup.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'; + +class CalculateShipmentCostEditor extends StatefulWidget { + final PickUp pickUp; + CalculateShipmentCostEditor({this.pickUp}); + + @override + _CalculateShipmentCostEditorState createState() => _CalculateShipmentCostEditorState(); +} + +class _CalculateShipmentCostEditorState extends State { + TextEditingController _addressEditingController = new TextEditingController(); + TextEditingController _fromTimeEditingController = + new TextEditingController(); + TextEditingController _toTimeEditingController = new TextEditingController(); + TextEditingController _noOfPackageEditingController = + new TextEditingController(); + TextEditingController _weightEditingController = new TextEditingController(); + + PickUp _pickUp; + bool _isLoading = false; + + @override + void initState() { + super.initState(); + if (widget.pickUp != null) { + _pickUp = widget.pickUp; + _addressEditingController.text = _pickUp.address; + _fromTimeEditingController.text = _pickUp.fromTime; + _toTimeEditingController.text = _pickUp.toTime; + _noOfPackageEditingController.text = _pickUp.numberOfPackage.toString(); + _weightEditingController.text = _pickUp.weight.toString(); + } + } + + @override + void dispose() { + super.dispose(); + } + + @override + Widget build(BuildContext context) { + var pickupModel = Provider.of(context); + + final pickUpAddress = Container( + child: TextFormField( + maxLines: null, + controller: _addressEditingController, + cursorColor: primaryColor, + style: textStyle, + 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: [ + Container( + width: 70.0, + child: TextFormField( + controller: _fromTimeEditingController, + cursorColor: primaryColor, + textAlign: TextAlign.left, + decoration: InputDecoration( + contentPadding: EdgeInsets.all(10.0), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.grey[300], width: 2), + ), + focusedBorder: OutlineInputBorder( + borderSide: const BorderSide(color: primaryColor, width: 2.0), + ), + ), + )), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text(' to '), + ), + Container( + width: 70.0, + child: TextFormField( + controller: _toTimeEditingController, + cursorColor: primaryColor, + textAlign: TextAlign.left, + decoration: InputDecoration( + contentPadding: EdgeInsets.all(10.0), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.grey[300], width: 2), + ), + focusedBorder: OutlineInputBorder( + borderSide: const BorderSide(color: primaryColor, width: 2.0), + ), + ), + )), + ]), + ); + + final noOfPackageBox = Container( + height: 50.0, + child: Row(children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text('Number of Packages '), + ), + Expanded( + child: TextFormField( + controller: _noOfPackageEditingController, + cursorColor: primaryColor, + textAlign: TextAlign.left, + decoration: InputDecoration( + contentPadding: EdgeInsets.all(10.0), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.grey[300], width: 2), + ), + focusedBorder: OutlineInputBorder( + borderSide: const BorderSide(color: primaryColor, width: 2.0), + ), + ), + )), + ]), + ); + + final weightBox = Container( + height: 50.0, + child: Row(children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text('Total Weight (lb) '), + ), + Expanded( + child: TextFormField( + controller: _weightEditingController, + cursorColor: primaryColor, + textAlign: TextAlign.left, + decoration: InputDecoration( + contentPadding: EdgeInsets.all(10.0), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.grey[300], width: 2), + ), + focusedBorder: OutlineInputBorder( + borderSide: const BorderSide(color: primaryColor, width: 2.0), + ), + ), + )), + ]), + ); + + return LocalProgress( + inAsyncCall: _isLoading, + child: Scaffold( + appBar: AppBar( + backgroundColor: primaryColor, + title: Text(AppTranslations.of(context).text("pickup.edit.title")), + ), + body: Card( + child: Column( + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.all(20.0), + child: ListView(children: [ + Text( + "U Aung Zaw", + style: TextStyle(fontSize: 15.0), + ), + Text( + "+82054857695", + style: TextStyle(fontSize: 15.0), + ), + pickUpAddress, + SizedBox(height: 15), + Text('Pickup Time'), + SizedBox(height: 15), + pickupTime, + SizedBox(height: 15), + noOfPackageBox, + SizedBox(height: 15), + weightBox + ]), + )), + widget.pickUp == null + ? Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + shape: new RoundedRectangleBorder( + borderRadius: new BorderRadius.circular(10)), + child: Text('Request'), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))) + : Container( + child: Column( + children: [ + Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + shape: new RoundedRectangleBorder( + borderRadius: + new BorderRadius.circular(10)), + child: Text('Pickuped'), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))), + Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + shape: new RoundedRectangleBorder( + borderRadius: + new BorderRadius.circular(10)), + child: Text('Cancel'), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))) + ], + )) + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/fcs_profile_page.dart b/lib/pages/fcs_profile_page.dart new file mode 100644 index 0000000..26cc8a9 --- /dev/null +++ b/lib/pages/fcs_profile_page.dart @@ -0,0 +1,201 @@ +import 'package:fcs/model/pickup_model.dart'; +import 'package:fcs/vo/pickup.dart'; +import 'package:fcs/widget/fcs_text_field.dart'; +import 'package:provider/provider.dart'; + +import 'package:flutter/material.dart'; +import 'package:fcs/widget/progress.dart'; + +import '../theme/theme.dart'; + +class FCSProfilePage extends StatefulWidget { + final PickUp pickUp; + FCSProfilePage({this.pickUp}); + + @override + _FCSProfilePageState createState() => _FCSProfilePageState(); +} + +class _FCSProfilePageState extends State { + TextEditingController _usaAddressEditingController = + new TextEditingController(); + TextEditingController _mmAddressEditingController = + new TextEditingController(); + TextEditingController _contactEditingController = new TextEditingController(); + TextEditingController _mmContactEditingController = + new TextEditingController(); + TextEditingController _mailEditingController = new TextEditingController(); + TextEditingController _fbLinkEditingController = new TextEditingController(); + + PickUp _pickUp; + bool _isLoading = false; + + @override + void initState() { + super.initState(); + var pickupModel = Provider.of(context, listen: false); + _usaAddressEditingController.text = pickupModel.profile.usaAddress; + _mmAddressEditingController.text = pickupModel.profile.mmAddress; + _contactEditingController.text = pickupModel.profile.usaContactNumber; + _mmContactEditingController.text = pickupModel.profile.mmContactNumber; + _mailEditingController.text = pickupModel.profile.mail; + _fbLinkEditingController.text = pickupModel.profile.facebook; + } + + @override + void dispose() { + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final usaAddress = Container( + child: FCSTextField( + controller: _usaAddressEditingController, + label: 'USA Delivery Address', + )); + + final mmAddress = Container( + height: 50.0, + child: Row(children: [ + Expanded( + child: FCSTextField( + controller: _mmAddressEditingController, + label: 'Yangon, Myanmar Office', + )), + ]), + ); + + final contactNumber = Container( + height: 50.0, + child: Row(children: [ + Expanded( + child: FCSTextField( + controller: _contactEditingController, + label: 'USA contact number', + )), + ]), + ); + + final mmContactNumber = Container( + height: 50.0, + child: Row(children: [ + Expanded( + child: FCSTextField( + controller: _mmContactEditingController, + label: 'Myanmar contact number', + )), + ]), + ); + + final mailBox = Container( + height: 50.0, + child: Row(children: [ + Expanded( + child: FCSTextField( + controller: _mailEditingController, + label: 'Email Address', + )), + ]), + ); + + final fbLinkBox = Container( + height: 50.0, + child: Row(children: [ + Expanded( + child: FCSTextField( + controller: _fbLinkEditingController, label: ' Facebook Link')), + ]), + ); + + return LocalProgress( + inAsyncCall: _isLoading, + child: Scaffold( + appBar: AppBar( + backgroundColor: primaryColor, + title: Text('Profile'), + ), + body: Card( + child: Column( + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.all(20.0), + child: ListView(children: [ + usaAddress, + SizedBox(height: 15), + mmAddress, + SizedBox(height: 15), + contactNumber, + SizedBox(height: 15), + mmContactNumber, + SizedBox(height: 15), + mailBox, + SizedBox(height: 15), + fbLinkBox, + SizedBox(height: 15), + ]), + )), + widget.pickUp == null + ? Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + shape: new RoundedRectangleBorder( + borderRadius: new BorderRadius.circular(10)), + child: Text('Update'), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))) + : Container( + child: Column( + children: [ + Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + shape: new RoundedRectangleBorder( + borderRadius: + new BorderRadius.circular(10)), + child: Text('Pickuped'), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))), + Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + shape: new RoundedRectangleBorder( + borderRadius: + new BorderRadius.circular(10)), + child: Text('Cancel'), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))) + ], + )) + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index 05c0c06..29f96b0 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -1,5 +1,8 @@ import 'dart:async'; +import 'package:fcs/pages/fcs_profile_page.dart'; +import 'package:fcs/pages/pickup_list.dart'; +import 'package:fcs/pages/shipment_rates.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/material.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; @@ -125,6 +128,21 @@ class _HomePageState extends State { btnCallback: () => Navigator.of(context) .push(MaterialPageRoute(builder: (_) => ReportList()))); + final pickUpBtn = _buildBtn("pickup.title", + icon: FontAwesomeIcons.directions, + btnCallback: () => Navigator.of(context) + .push(MaterialPageRoute(builder: (_) => PickUpList()))); + + final shipmentCostBtn = _buildBtn("pickup.title", + icon: FontAwesomeIcons.ship, + btnCallback: () => Navigator.of(context) + .push(MaterialPageRoute(builder: (_) => ShipmentRates()))); + + final fcsProfileBtn = _buildBtn("profile.title", + icon: Icons.account_circle, + btnCallback: () => Navigator.of(context) + .push(MaterialPageRoute(builder: (_) => FCSProfilePage()))); + final myRegBtn = _buildBtn("myreg.title", imgIcon: Image.asset( "assets/reg.png", @@ -227,9 +245,11 @@ class _HomePageState extends State { ); }); - List widgets = [helpBtn]; widgets.add(announcementBtn); + widgets.add(pickUpBtn); + widgets.add(fcsProfileBtn); + widgets.add(shipmentCostBtn); widgets.add(reportBtn); widgets.add(termBtn); widgets.add(_bankAccountsBtn); diff --git a/lib/pages/pickup_editor.dart b/lib/pages/pickup_editor.dart new file mode 100644 index 0000000..8e6e103 --- /dev/null +++ b/lib/pages/pickup_editor.dart @@ -0,0 +1,237 @@ +import 'package:fcs/model/pickup_model.dart'; +import 'package:fcs/vo/pickup.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'; + +class PickUpEditor extends StatefulWidget { + final PickUp pickUp; + PickUpEditor({this.pickUp}); + + @override + _PickUpEditorState createState() => _PickUpEditorState(); +} + +class _PickUpEditorState extends State { + TextEditingController _addressEditingController = new TextEditingController(); + TextEditingController _fromTimeEditingController = + new TextEditingController(); + TextEditingController _toTimeEditingController = new TextEditingController(); + TextEditingController _noOfPackageEditingController = + new TextEditingController(); + TextEditingController _weightEditingController = new TextEditingController(); + + PickUp _pickUp; + bool _isLoading = false; + + @override + void initState() { + super.initState(); + if (widget.pickUp != null) { + _pickUp = widget.pickUp; + _addressEditingController.text = _pickUp.address; + _fromTimeEditingController.text = _pickUp.fromTime; + _toTimeEditingController.text = _pickUp.toTime; + _noOfPackageEditingController.text = _pickUp.numberOfPackage.toString(); + _weightEditingController.text = _pickUp.weight.toString(); + } + } + + @override + void dispose() { + super.dispose(); + } + + @override + Widget build(BuildContext context) { + var pickupModel = Provider.of(context); + + final pickUpAddress = Container( + child: TextFormField( + maxLines: null, + controller: _addressEditingController, + cursorColor: primaryColor, + style: textStyle, + 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: [ + 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: [ + 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: [ + 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)), + ), + )), + ]), + ); + + return LocalProgress( + inAsyncCall: _isLoading, + child: Scaffold( + appBar: AppBar( + backgroundColor: primaryColor, + title: Text(AppTranslations.of(context).text("pickup.edit.title")), + ), + body: Card( + child: Column( + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.all(20.0), + child: ListView(children: [ + Text( + "U Aung Zaw", + style: TextStyle(fontSize: 15.0), + ), + Text( + "+82054857695", + style: TextStyle(fontSize: 15.0), + ), + pickUpAddress, + SizedBox(height: 15), + Text('Pickup Time'), + SizedBox(height: 15), + pickupTime, + SizedBox(height: 15), + noOfPackageBox, + SizedBox(height: 15), + weightBox + ]), + )), + widget.pickUp == null + ? Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + shape: new RoundedRectangleBorder( + borderRadius: new BorderRadius.circular(10)), + child: Text('Request'), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))) + : Container( + child: Column( + children: [ + Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + shape: new RoundedRectangleBorder( + borderRadius: + new BorderRadius.circular(10)), + child: Text('Pickuped'), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))), + Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + shape: new RoundedRectangleBorder( + borderRadius: + new BorderRadius.circular(10)), + child: Text('Cancel'), + color: Colors.blue, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))) + ], + )) + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/pickup_list.dart b/lib/pages/pickup_list.dart new file mode 100644 index 0000000..8f2f414 --- /dev/null +++ b/lib/pages/pickup_list.dart @@ -0,0 +1,170 @@ +import 'package:fcs/model/pickup_model.dart'; +import 'package:fcs/pages/pickup_list_row.dart'; +import 'package:provider/provider.dart'; +import 'package:fcs/model/buyer_model.dart'; +import 'package:fcs/pages/search_page.dart'; +import 'package:fcs/vo/buyer.dart'; +import 'package:fcs/vo/popup_menu.dart'; +import 'package:fcs/widget/localization/app_translations.dart'; +import 'package:fcs/widget/popupmenu.dart'; + +import 'package:flutter/material.dart'; +import 'package:fcs/widget/progress.dart'; + +import '../theme/theme.dart'; +import '../theme/theme.dart'; +import '../theme/theme.dart'; +import 'buyer_list_row.dart'; +import 'pickup_editor.dart'; + +class PickUpList extends StatefulWidget { + @override + _PickUpListState createState() => _PickUpListState(); +} + +class _PickUpListState extends State { + Buyer buyer; + bool _isLoading = false; + + @override + void initState() { + super.initState(); + } + + @override + void dispose() { + super.dispose(); + } + + @override + Widget build(BuildContext context) { + var pickupModel = Provider.of(context); + + return LocalProgress( + inAsyncCall: _isLoading, + child: Scaffold( + appBar: AppBar( + backgroundColor: primaryColor, + title: Text(AppTranslations.of(context).text("pickup.title")), + actions: [ + IconButton( + icon: Icon( + Icons.search, + color: Colors.white, + ), + iconSize: 30, + onPressed: () => showPlacesSearch(context), + ), + PopupMenuButton( + elevation: 3.2, + onSelected: (selected) {}, + icon: Container( + width: 30, + height: 30, + decoration: new BoxDecoration( + shape: BoxShape.circle, + color: Colors.white, + ), + child: Stack( + fit: StackFit.expand, + children: [ + Icon( + Icons.sort, + color: primaryColor, + ), + ], + )), + itemBuilder: (BuildContext context) { + return userMenu.map((PopupMenu choice) { + return PopupMenuItem( + value: choice, + child: Container( + padding: EdgeInsets.only(left: 8), + child: Row( + children: [ + Text(choice.status), + SizedBox( + width: 10, + ), + ], + ), + ), + ); + }).toList(); + }), + PopupMenuButton( + elevation: 3.2, + onSelected: (selected) { + String status; + }, + icon: Container( + width: 30, + height: 30, + decoration: new BoxDecoration( + shape: BoxShape.circle, + color: Colors.white, + ), + child: Stack( + fit: StackFit.expand, + children: [ + Icon( + Icons.filter_list, + color: primaryColor, + ), + ], + )), + itemBuilder: (BuildContext context) { + return buyerStatusMenu.map((PopupMenu choice) { + return PopupMenuItem( + value: choice, + child: Row( + children: [ + Text(choice.status), + SizedBox( + width: 10, + ), + ], + ), + ); + }).toList(); + }), + ], + ), + body: Column( + children: [ + Expanded( + child: new ListView.builder( + scrollDirection: Axis.vertical, + padding: EdgeInsets.only(top: 15), + shrinkWrap: true, + itemCount: pickupModel.pickups.length, + itemBuilder: (BuildContext context, int index) { + return PickupListRow(pickUp: pickupModel.pickups[index]); + }), + ), + Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + shape: new RoundedRectangleBorder( + borderRadius: new BorderRadius.circular(10)), + child: Text(AppTranslations.of(context).text("pickup.new")), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => new PickUpEditor()), + ); + }, + ), + ))) + ], + ), + ), + ); + } +} diff --git a/lib/pages/pickup_list_row.dart b/lib/pages/pickup_list_row.dart new file mode 100644 index 0000000..c8a9890 --- /dev/null +++ b/lib/pages/pickup_list_row.dart @@ -0,0 +1,117 @@ +import 'package:fcs/model/pickup_model.dart'; +import 'package:fcs/pages/pickup_editor.dart'; +import 'package:fcs/vo/pickup.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:fcs/model/buyer_model.dart'; +import 'package:fcs/pages/util.dart'; +import 'package:fcs/theme/theme.dart'; +import 'package:fcs/vo/buyer.dart'; + +import 'buyer_info.dart'; + +class PickupListRow extends StatefulWidget { + final PickUp pickUp; + const PickupListRow({this.pickUp}); + + @override + _PickupListRowState createState() => _PickupListRowState(); +} + +class _PickupListRowState extends State { + final double dotSize = 15.0; + PickUp _pickUp = new PickUp(); + + @override + void initState() { + super.initState(); + // PickUpModel pickUpModel = Provider.of(context, listen: false); + if (widget.pickUp != null) { + _pickUp = widget.pickUp; + // pickUpModel.pickups.forEach((b) { + // if (widget.pickUp.id == b.id) { + // _pickUp = b; + // } + // }); + } + } + + @override + Widget build(BuildContext context) { + print('_pickup $_pickUp'); + return Container( + padding: EdgeInsets.only(left: 15, right: 15), + child: Card( + elevation: 10, + color: Colors.white, + child: InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => PickUpEditor(pickUp: _pickUp)), + ); + }, + child: Row( + children: [ + Expanded( + child: new Padding( + padding: const EdgeInsets.symmetric(vertical: 16.0), + child: new Row( + children: [ + new Expanded( + child: new Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(left: 8.0), + child: new Text( + _pickUp.id == null ? '' : _pickUp.id, + style: new TextStyle( + fontSize: 15.0, color: Colors.black), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 8.0), + child: Row( + children: [ + new Text( + _pickUp.weight == null + ? '' + : _pickUp.weight.toString() + 'lb - ', + style: new TextStyle( + fontSize: 15.0, color: Colors.grey), + ), + new Text( + _pickUp.numberOfPackage == null + ? "" + : _pickUp.numberOfPackage.toString() + + ' packages', + style: new TextStyle( + fontSize: 15.0, color: Colors.grey), + ), + ], + ), + ), + ], + ), + ), + ], + ), + ), + ), + Row( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: getStatus(_pickUp.status), + ), + ], + ) + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/shipment_rates.dart b/lib/pages/shipment_rates.dart new file mode 100644 index 0000000..977e633 --- /dev/null +++ b/lib/pages/shipment_rates.dart @@ -0,0 +1,305 @@ +import 'package:fcs/model/pickup_model.dart'; +import 'package:fcs/model/shipment_rate_model.dart'; +import 'package:fcs/vo/pickup.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'; + +class ShipmentRates extends StatefulWidget { + final PickUp pickUp; + ShipmentRates({this.pickUp}); + + @override + _ShipmentRatesState createState() => _ShipmentRatesState(); +} + +class _ShipmentRatesState extends State { + TextEditingController _addressEditingController = new TextEditingController(); + TextEditingController _fromTimeEditingController = + new TextEditingController(); + TextEditingController _toTimeEditingController = new TextEditingController(); + TextEditingController _noOfPackageEditingController = + new TextEditingController(); + TextEditingController _weightEditingController = new TextEditingController(); + + PickUp _pickUp; + bool _isLoading = false; + + @override + void initState() { + super.initState(); + if (widget.pickUp != null) { + _pickUp = widget.pickUp; + _addressEditingController.text = _pickUp.address; + _fromTimeEditingController.text = _pickUp.fromTime; + _toTimeEditingController.text = _pickUp.toTime; + _noOfPackageEditingController.text = _pickUp.numberOfPackage.toString(); + _weightEditingController.text = _pickUp.weight.toString(); + } + } + + @override + void dispose() { + super.dispose(); + } + + @override + Widget build(BuildContext context) { + var shipmentRateModel = Provider.of(context); + + final usaAddress = Container( + child: TextFormField( + maxLines: null, + controller: _addressEditingController, + cursorColor: primaryColor, + style: textStyle, + decoration: new InputDecoration( + labelText: 'USA Delivery Address', + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide(color: primaryColor, width: 1.0)), + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide(color: primaryColor, width: 1.0)), + ), + )); + + final mmAddress = Container( + height: 50.0, + child: Row(children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text('Yangon, Myanmar Office'), + ), + Expanded( + child: TextFormField( + controller: _noOfPackageEditingController, + cursorColor: primaryColor, + textAlign: TextAlign.left, + decoration: InputDecoration( + contentPadding: EdgeInsets.all(10.0), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.grey[300], width: 2), + ), + focusedBorder: OutlineInputBorder( + borderSide: const BorderSide(color: primaryColor, width: 2.0), + ), + ), + )), + ]), + ); + + final contactNumber = Container( + height: 50.0, + child: Row(children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text('USA contact number'), + ), + Expanded( + child: TextFormField( + controller: _weightEditingController, + cursorColor: primaryColor, + textAlign: TextAlign.left, + decoration: InputDecoration( + contentPadding: EdgeInsets.all(10.0), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.grey[300], width: 2), + ), + focusedBorder: OutlineInputBorder( + borderSide: const BorderSide(color: primaryColor, width: 2.0), + ), + ), + )), + ]), + ); + + final mmContactNumber = Container( + height: 50.0, + child: Row(children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text('Myanmar contact number'), + ), + Expanded( + child: TextFormField( + controller: _weightEditingController, + cursorColor: primaryColor, + textAlign: TextAlign.left, + decoration: InputDecoration( + contentPadding: EdgeInsets.all(10.0), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.grey[300], width: 2), + ), + focusedBorder: OutlineInputBorder( + borderSide: const BorderSide(color: primaryColor, width: 2.0), + ), + ), + )), + ]), + ); + + final mailBox = Container( + height: 50.0, + child: Row(children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text('Email Address'), + ), + Expanded( + child: TextFormField( + controller: _weightEditingController, + cursorColor: primaryColor, + textAlign: TextAlign.left, + decoration: InputDecoration( + contentPadding: EdgeInsets.all(10.0), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.grey[300], width: 2), + ), + focusedBorder: OutlineInputBorder( + borderSide: const BorderSide(color: primaryColor, width: 2.0), + ), + ), + )), + ]), + ); + + final fbLinkBox = Container( + height: 50.0, + child: Row(children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text('Facebook Link'), + ), + Expanded( + child: TextFormField( + controller: _weightEditingController, + cursorColor: primaryColor, + textAlign: TextAlign.left, + decoration: InputDecoration( + contentPadding: EdgeInsets.all(10.0), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.grey[300], width: 2), + ), + focusedBorder: OutlineInputBorder( + borderSide: const BorderSide(color: primaryColor, width: 2.0), + ), + ), + )), + ]), + ); + + return LocalProgress( + inAsyncCall: _isLoading, + child: Scaffold( + appBar: AppBar( + backgroundColor: primaryColor, + title: Text(AppTranslations.of(context).text("pickup.edit.title")), + ), + body: Card( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 250, + // child: Image.asset( + // 'assets/logo.jpg', + // ), + ), + Padding( + padding: const EdgeInsets.only(left: 20.0), + child: Text('Rates', + style: + TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + Padding( + padding: const EdgeInsets.only(left: 20.0), + child: Text('Most affortable rate', + style: TextStyle(fontSize: 14.0)), + ), + Container( + height: 100, + child: Padding( + padding: const EdgeInsets.all(20.0), + child: ListView.builder( + itemCount: shipmentRateModel.rates.length, + itemBuilder: (context, index) { + return Container( + child: Row( + children: [ + Text( + '${shipmentRateModel.rates[index].description} - '), + Text( + '\$${shipmentRateModel.rates[index].price} per lb', + style: TextStyle(color: Colors.blueAccent), + ) + ], + )); + })), + ), + widget.pickUp == null + ? Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + shape: new RoundedRectangleBorder( + borderRadius: new BorderRadius.circular(10)), + child: Text('Calculate my packages'), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))) + : Container( + child: Column( + children: [ + Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + shape: new RoundedRectangleBorder( + borderRadius: + new BorderRadius.circular(10)), + child: Text('Pickuped'), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))), + Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + shape: new RoundedRectangleBorder( + borderRadius: + new BorderRadius.circular(10)), + child: Text('Cancel'), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))) + ], + )) + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/util.dart b/lib/pages/util.dart index 974868f..9669378 100644 --- a/lib/pages/util.dart +++ b/lib/pages/util.dart @@ -234,12 +234,22 @@ Widget getStatus(String status) { status, style: TextStyle(color: Colors.white, fontSize: 12), )) - : Chip( - avatar: Icon( - Icons.check, - size: 14, - ), - label: Text(status)); + : status == "pickup" + ? Text( + status, + style: TextStyle(color: Colors.red, fontSize: 12), + ) + : status == "delivered" + ? Text( + status, + style: TextStyle(color: Colors.green, fontSize: 12), + ) + : Chip( + avatar: Icon( + Icons.check, + size: 14, + ), + label: Text(status)); } call(BuildContext context, String phone) { diff --git a/lib/vo/fcs_profile.dart b/lib/vo/fcs_profile.dart new file mode 100644 index 0000000..3dc44ac --- /dev/null +++ b/lib/vo/fcs_profile.dart @@ -0,0 +1,19 @@ +class FCSProfile { + String id; + String usaAddress; + String mmAddress; + String usaContactNumber; + String mmContactNumber; + String mail; + String facebook; + + FCSProfile({ + this.id, + this.usaAddress, + this.mmAddress, + this.usaContactNumber, + this.mmContactNumber, + this.mail, + this.facebook, + }); +} diff --git a/lib/vo/pickup.dart b/lib/vo/pickup.dart new file mode 100644 index 0000000..cbe080c --- /dev/null +++ b/lib/vo/pickup.dart @@ -0,0 +1,40 @@ +class PickUp { + String id; + String userName; + String phoneNumber; + String fromTime; + String toTime; + int numberOfPackage; + int weight; + String address; + String status; + + PickUp( + {this.id, + this.userName, + this.phoneNumber, + this.fromTime, + this.toTime, + this.numberOfPackage, + this.weight, + this.address, + this.status}); + + factory PickUp.fromMap(Map map, String id) { + return PickUp( + id: id, + userName: map['user_name'], + phoneNumber: map['phone_number'], + fromTime: map['from_time'], + toTime: map['to_time'], + numberOfPackage: map['number_of_package'], + weight: map['weight'], + address: map['address'], + status: map['status']); + } + + @override + String toString() { + return 'PickUp{id:$id, userName:$userName,phoneNumber:$phoneNumber,fromTime:$fromTime,toTime:$toTime,numberOfPackage:$numberOfPackage,weight:$weight,status:$status}'; + } +} diff --git a/lib/vo/rate.dart b/lib/vo/rate.dart new file mode 100644 index 0000000..c0faaf6 --- /dev/null +++ b/lib/vo/rate.dart @@ -0,0 +1,31 @@ +class Rate { + String id; + String name; + String description; + String fromTime; + String toTime; + int price; + + Rate( + {this.id, + this.name, + this.description, + this.fromTime, + this.toTime, + this.price,}); + + factory Rate.fromMap(Map map, String id) { + return Rate( + id: id, + name: map['name'], + description: map['description'], + fromTime: map['from_time'], + toTime: map['to_time'], + price: map['price'],); + } + + @override + String toString() { + return 'Rate{id:$id, name:$name,description:$description,fromTime:$fromTime,toTime:$toTime}'; + } +} diff --git a/lib/widget/fcs_text_field.dart b/lib/widget/fcs_text_field.dart new file mode 100644 index 0000000..eb29067 --- /dev/null +++ b/lib/widget/fcs_text_field.dart @@ -0,0 +1,27 @@ +import 'package:flutter/material.dart'; + +import '../theme/theme.dart'; + +class FCSTextField extends StatelessWidget { + final TextEditingController controller; + final String label; + + const FCSTextField({Key key, this.controller, this.label}) : super(key: key); + @override + Widget build(BuildContext context) { + return TextFormField( + maxLines: null, + controller: controller, + cursorColor: primaryColor, + textAlign: TextAlign.left, + decoration: InputDecoration( + labelText: label, + contentPadding: EdgeInsets.all(10.0), + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide(color: primaryColor, width: 1.0)), + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide(color: primaryColor, width: 1.0)), + ), + ); + } +}