diff --git a/assets/fonts/Metropolis/Metropolis-Black.otf b/assets/fonts/Metropolis/Metropolis-Black.otf new file mode 100644 index 0000000..3abd623 Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-Black.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-BlackItalic.otf b/assets/fonts/Metropolis/Metropolis-BlackItalic.otf new file mode 100644 index 0000000..3d6a9e4 Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-BlackItalic.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-Bold.otf b/assets/fonts/Metropolis/Metropolis-Bold.otf new file mode 100644 index 0000000..a42b941 Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-Bold.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-BoldItalic.otf b/assets/fonts/Metropolis/Metropolis-BoldItalic.otf new file mode 100644 index 0000000..f242515 Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-BoldItalic.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-ExtraBold.otf b/assets/fonts/Metropolis/Metropolis-ExtraBold.otf new file mode 100644 index 0000000..ca0b9ec Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-ExtraBold.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-ExtraBoldItalic.otf b/assets/fonts/Metropolis/Metropolis-ExtraBoldItalic.otf new file mode 100644 index 0000000..667c708 Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-ExtraBoldItalic.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-ExtraLight.otf b/assets/fonts/Metropolis/Metropolis-ExtraLight.otf new file mode 100644 index 0000000..b02e041 Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-ExtraLight.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-ExtraLightItalic.otf b/assets/fonts/Metropolis/Metropolis-ExtraLightItalic.otf new file mode 100644 index 0000000..2740b28 Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-ExtraLightItalic.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-Light.otf b/assets/fonts/Metropolis/Metropolis-Light.otf new file mode 100644 index 0000000..b8b917c Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-Light.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-LightItalic.otf b/assets/fonts/Metropolis/Metropolis-LightItalic.otf new file mode 100644 index 0000000..717133c Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-LightItalic.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-Medium.otf b/assets/fonts/Metropolis/Metropolis-Medium.otf new file mode 100644 index 0000000..239d69d Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-Medium.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-MediumItalic.otf b/assets/fonts/Metropolis/Metropolis-MediumItalic.otf new file mode 100644 index 0000000..dc30091 Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-MediumItalic.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-Regular.otf b/assets/fonts/Metropolis/Metropolis-Regular.otf new file mode 100644 index 0000000..737760b Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-Regular.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-RegularItalic.otf b/assets/fonts/Metropolis/Metropolis-RegularItalic.otf new file mode 100644 index 0000000..14d62bc Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-RegularItalic.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-SemiBold.otf b/assets/fonts/Metropolis/Metropolis-SemiBold.otf new file mode 100644 index 0000000..f9889d0 Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-SemiBold.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-SemiBoldItalic.otf b/assets/fonts/Metropolis/Metropolis-SemiBoldItalic.otf new file mode 100644 index 0000000..fdbd016 Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-SemiBoldItalic.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-Thin.otf b/assets/fonts/Metropolis/Metropolis-Thin.otf new file mode 100644 index 0000000..f969dcc Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-Thin.otf differ diff --git a/assets/fonts/Metropolis/Metropolis-ThinItalic.otf b/assets/fonts/Metropolis/Metropolis-ThinItalic.otf new file mode 100644 index 0000000..248bd94 Binary files /dev/null and b/assets/fonts/Metropolis/Metropolis-ThinItalic.otf differ diff --git a/assets/images/closed_box.png b/assets/images/closed_box.png index 3f7844f..3c10c8e 100644 Binary files a/assets/images/closed_box.png and b/assets/images/closed_box.png differ diff --git a/assets/images/open_box.png b/assets/images/open_box.png deleted file mode 100644 index 415c732..0000000 Binary files a/assets/images/open_box.png and /dev/null differ diff --git a/assets/images/opend_box.png b/assets/images/opend_box.png new file mode 100644 index 0000000..c0697bd Binary files /dev/null and b/assets/images/opend_box.png differ diff --git a/assets/images/qr_code.png b/assets/images/qr_code.png index e50e92b..b6f6db5 100644 Binary files a/assets/images/qr_code.png and b/assets/images/qr_code.png differ diff --git a/lib/main.dart b/lib/main.dart index 9626777..93879f9 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -8,8 +8,6 @@ import 'config/size_config.dart'; import 'core/viewModels/project_view_model.dart'; import 'locator.dart'; - - void main() { setupLocator(); runApp(MyApp()); @@ -44,6 +42,7 @@ class MyApp extends StatelessWidget { const Locale('en', ''), // English ], theme: ThemeData( + fontFamily: 'Metropolis', primarySwatch: Colors.blue, visualDensity: VisualDensity.adaptivePlatformDensity, brightness: Brightness.light, @@ -53,12 +52,11 @@ class MyApp extends StatelessWidget { TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), }, ), - scaffoldBackgroundColor:Color.fromRGBO(239, 245, 245, 1) , + scaffoldBackgroundColor: Color.fromRGBO(239, 245, 245, 1), hintColor: Colors.grey[400], disabledColor: Colors.grey[300], bottomSheetTheme: BottomSheetThemeData( - backgroundColor: Color.fromRGBO(239, 245, 245, 1) - ), + backgroundColor: Color.fromRGBO(239, 245, 245, 1)), errorColor: Color.fromRGBO(235, 80, 60, 1.0), textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), textSelectionHandleColor: Color.fromRGBO(80, 100, 253, 1.0), diff --git a/lib/pages/dashboard/dashboard_screen.dart b/lib/pages/dashboard/dashboard_screen.dart index e9e770f..9f58d6c 100644 --- a/lib/pages/dashboard/dashboard_screen.dart +++ b/lib/pages/dashboard/dashboard_screen.dart @@ -42,8 +42,11 @@ class _DashboardScreenState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'Have a great day ,', - style: TextStyle(fontSize: 12.5), + 'Have a great day,', + style: TextStyle( + fontSize: 14.5, + color: Color(0xff636363), + fontWeight: FontWeight.w300), ), Padding( padding: EdgeInsets.only(top: 4.5), @@ -94,7 +97,7 @@ class _DashboardScreenState extends State { height: MediaQuery .of(context) .size - .height * 0.15, + .height * 0.16, width: MediaQuery .of(context) .size @@ -107,59 +110,64 @@ class _DashboardScreenState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Padding( - padding: EdgeInsets.all(10.0), + Expanded( + child: Padding( + padding: EdgeInsets.all(2.0), child: Column( mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Text( - 'You Have', - style: TextStyle( - color: Colors.white, fontSize: 10.0), - ), - Text( - '5', - style: TextStyle( - color: Colors.white, fontSize: 25.0), - ), - Expanded( - child: Text( - 'Undelivered \n Packages', + MainAxisAlignment.spaceEvenly, + children: [ + Text( + 'You Have', style: TextStyle( color: Colors.white, fontSize: 10.0), ), - ) - ], + Text( + '5', + style: TextStyle( + color: Colors.white, + fontSize: 25.0), + ), + Text( + 'Undeliverd\nPackages', + style: TextStyle( + color: Colors.white, fontSize: 9.5), + ) + ], + ), ), ), - Expanded( - child: Padding( - padding: EdgeInsets.all(4.0), + Padding( + padding: EdgeInsets.only(right: 9.5), + child: Container( + width: 110, + height: 110, + decoration: BoxDecoration( + color: Colors.white10, + shape: BoxShape.circle), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Padding( - padding: EdgeInsets.only(right: 9.5), - child: Image.asset( + Image.asset( 'assets/images/closed_box.png', height: MediaQuery .of(context) .size .height * - 0.09, + 0.10, width: MediaQuery .of(context) .size .width * 0.20, - //fit: BoxFit.cover, - )), + scale: 0.9, + fit: BoxFit.cover, + ), ], ), ), - ) + ), ], ), ), @@ -167,27 +175,28 @@ class _DashboardScreenState extends State { ], ), ), - Column( - children: [ - Padding( - padding: EdgeInsets.symmetric(horizontal: 10.0), - child: Container( - height: MediaQuery.of(context).size.height * 0.15, + Expanded( + child: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 10.0), + child: Container( + height: MediaQuery.of(context).size.height * 0.16, width: MediaQuery .of(context) .size - .width * 0.44, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(15.0), - gradient: LinearGradient( - colors: [Color(0xff17AFB8), Color(0xff49C1BC)]), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Padding( - padding: EdgeInsets.all(12.0), + .width * 0.45, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15.0), + gradient: LinearGradient( + colors: [Color(0xff17AFB8), Color(0xff49C1BC)]), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Padding( + padding: EdgeInsets.all(2.0), child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, @@ -202,40 +211,48 @@ class _DashboardScreenState extends State { style: TextStyle( color: Colors.white, fontSize: 25.0), ), - Expanded( - child: Text( - 'unWanted\n Packge', + Text( + 'Succesful\nDeliveries', style: TextStyle( color: Colors.white, fontSize: 10.0), - ), - ) - ], + ) + ], + ), ), ), - ), - Padding( - padding: EdgeInsets.only(right: 9.5), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - 'assets/images/open_box.png', - height: MediaQuery.of(context).size.height * - 0.10, - width: MediaQuery.of(context).size.width * - 0.20, - scale: 0.9, - fit: BoxFit.cover, + Padding( + padding: EdgeInsets.only(right: 9.5), + child: Container( + width: 110, + height: 110, + decoration: BoxDecoration( + color: Colors.white10, + shape: BoxShape.circle), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/opend_box.png', + height: + MediaQuery.of(context).size.height * + 0.10, + width: + MediaQuery.of(context).size.width * + 0.20, + scale: 0.9, + fit: BoxFit.cover, + ), + ], ), - ], + ), ), - ), - ], + ], + ), ), - ), - ) - ], + ) + ], + ), ), ], ), @@ -249,7 +266,7 @@ class _DashboardScreenState extends State { height: MediaQuery .of(context) .size - .height * 0.16, + .height * 0.18, width: MediaQuery .of(context) .size @@ -272,13 +289,13 @@ class _DashboardScreenState extends State { MediaQuery .of(context) .size - .width * 0.25, + .width * 0.26, height: MediaQuery .of(context) .size .height * 0.14, - fit: BoxFit.cover, + fit: BoxFit.contain, ) ], ), @@ -293,7 +310,9 @@ class _DashboardScreenState extends State { child: Text( 'SCAN', style: TextStyle( - fontSize: 35.0, color: Colors.white), + fontSize: 35.0, + color: Colors.white, + fontWeight: FontWeight.w400), ), ), Padding( @@ -319,7 +338,7 @@ class _DashboardScreenState extends State { ), ), Padding( - padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 1.0), + padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 1.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -342,11 +361,13 @@ class _DashboardScreenState extends State { children: [ Text( 'See All', - style: TextStyle(fontSize: 14.5), + style: TextStyle( + fontSize: 14.5, color: Color(0xff42B6AD)), ), Icon( Icons.arrow_forward_ios, size: 15.0, + color: Color(0xff42B6AD), ), ], ), @@ -364,8 +385,8 @@ class _DashboardScreenState extends State { child: ListView.builder( shrinkWrap: true, scrollDirection: Axis.vertical, - itemCount: model.orders == null ? 0 : model.orders.length, -// 2, + itemCount: //model.orders == null ? 0 : model.orders.length, + 3, itemBuilder: (BuildContext context, int index) { return Padding( padding: EdgeInsets.symmetric(horizontal: 12.2), @@ -374,7 +395,7 @@ class _DashboardScreenState extends State { height: MediaQuery .of(context) .size - .height * 0.108, + .height * 0.109, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -384,20 +405,15 @@ class _DashboardScreenState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( - padding: EdgeInsets.only(left: 22.0), + padding: EdgeInsets.only( + left: 10.0, bottom: 5.0), child: Image.asset( 'assets/images/location.png', height: - MediaQuery - .of(context) - .size - .height * - 0.10, - width: MediaQuery - .of(context) - .size - .width * - 0.09, + MediaQuery.of(context).size.height * + 0.06, + width: MediaQuery.of(context).size.width * + 0.05, ), ) ], @@ -428,7 +444,7 @@ class _DashboardScreenState extends State { ), Expanded( child: Text( - 'Olaya ST, Behind kfc next to king ,', + 'Olaya ST, Behind kfc next to king , ', style: TextStyle(color: Colors.black45), ), ), @@ -453,8 +469,8 @@ class _DashboardScreenState extends State { '3 K.m \n away', style: TextStyle( color: Color(0xff30B7B9), - fontSize: 12.5, - fontWeight: FontWeight.w600), + fontSize: 10.5, + fontWeight: FontWeight.w400), ), ), ), @@ -477,7 +493,7 @@ class _DashboardScreenState extends State { ); }, ), - ) + ), ], ), ), diff --git a/lib/pages/orders/pending_orders_page.dart b/lib/pages/orders/pending_orders_page.dart index 69b59d4..4d265b3 100644 --- a/lib/pages/orders/pending_orders_page.dart +++ b/lib/pages/orders/pending_orders_page.dart @@ -1,10 +1,10 @@ -import 'package:driverapp/core/viewModels/orders_view_model.dart'; -import 'package:driverapp/pages/delivery/information_page.dart'; -import 'package:driverapp/widgets/others/rounded_container.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - +import 'package:driverapp/config/size_config.dart'; +import 'package:driverapp/core/viewModels/orders_view_model.dart'; import '../base/base_view.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:driverapp/widgets/others/rounded_container.dart'; +import 'package:driverapp/pages/delivery/information_page.dart'; class OrdersListScreen extends StatefulWidget { @override @@ -18,151 +18,127 @@ class _OrdersListScreenState extends State { onModelReady: (model) => model.getPendingOrders(), builder: (BuildContext context, OrdersViewModel model, Widget child) => Scaffold( - appBar: AppBar( - centerTitle: true, - backgroundColor: Color(0xffF4F9FA), - title: Text( - 'Your Delivery Que', - ), - ), - body: Column( - children: [ - Center( - child: Text( - 'Nearest', - style: TextStyle( - color: Color(0xff30B7B9), - fontSize: 18.0, - fontWeight: FontWeight.w400), - ), - ), - Expanded( - child: ListView.builder( - itemCount: model.orders == null ? 0 : model.orders.length, - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemBuilder: (BuildContext context, int index) { - return InkWell( - onTap: () { - Navigator.push( - context, MaterialPageRoute( - builder: (context) => - InformationPage(model.orders[index]))); - }, - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 12.2), - child: RoundedContainer( - height: MediaQuery - .of(context) - .orientation == - Orientation.portrait - ? MediaQuery - .of(context) - .size - .height * 0.107 - : MediaQuery - .of(context) - .size - .height * 0.18, - child: Row( - mainAxisAlignment: MainAxisAlignment - .spaceBetween, + appBar: AppBar( + centerTitle: true, + backgroundColor: Color(0xffF4F9FA), + title: Text( + 'Your Delivery Que', + ), + ), + body: Column( + children: [ + Expanded( + child: ListView.builder( + shrinkWrap: true, + scrollDirection: Axis.vertical, + itemCount: model.orders == null ? 0 : model.orders.length, + itemBuilder: (BuildContext context, int index) { + return Padding( + padding: EdgeInsets.symmetric(horizontal: 12.2), + child: InkWell( + child: RoundedContainer( + height: MediaQuery.of(context).size.height * 0.109, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, children: [ - Expanded( - flex: 1, - child: Column( - mainAxisAlignment: MainAxisAlignment - .center, - children: [ - Padding( - padding: EdgeInsets.only(left: 22.0), - child: Image.asset( - 'assets/images/location.png', - height: - MediaQuery - .of(context) - .size - .height * - 0.101, - ), - ), - ], + Padding( + padding: EdgeInsets.only( + left: 10.0, bottom: 5.0), + child: Image.asset( + 'assets/images/location.png', + height: + MediaQuery.of(context).size.height * + 0.06, + width: MediaQuery.of(context).size.width * + 0.05, + ), + ) + ], + ), + ), + if (model.orders.length != 0) + Expanded( + flex: 3, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(top: 5.0), + child: Text( + model.orders[index].firstName + + ' ' + + model.orders[index].lastName, + style: TextStyle(fontSize: 18.0), + ), + ), + Text( + model.orders[index].mobileNumber, + style: TextStyle( + color: Color(0xff30B7B9), + fontWeight: FontWeight.w600, + fontSize: 15.0, + ), ), - ), - if (model.orders.length != 0) Expanded( - flex: 3, - child: Column( - crossAxisAlignment: CrossAxisAlignment - .start, - children: [ - Padding( - padding: EdgeInsets.only(top: 10.0), - child: Text( - model.orders[index].firstName + - ' ' + - model.orders[index].lastName, - style: TextStyle(fontSize: 18.0), - ), - ), - Text( - model.orders[index].mobileNumber, + child: Text( + 'Olaya ST, Behind kfc next to king ,', + style: TextStyle(color: Colors.black45), + ), + ), + ], + ), + ), + Padding( + padding: EdgeInsets.all(10.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: CircleAvatar( + backgroundColor: Colors.black45, + radius: 28.0, + child: CircleAvatar( + backgroundColor: Colors.white, + maxRadius: 24.1, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + '3 K.m \n away', style: TextStyle( color: Color(0xff30B7B9), - fontWeight: FontWeight.w600, - fontSize: 15.0), + fontSize: 10.5, + fontWeight: FontWeight.w400), ), - Expanded( - child: Text( - 'Olaya ST, Behind kfc next to king ', - style: TextStyle( - color: Colors.black45), - ), - ) - ], + ), ), ), - Padding( - padding: EdgeInsets.all(10.0), - child: Column( - mainAxisAlignment: MainAxisAlignment - .center, - children: [ - Expanded( - child: CircleAvatar( - backgroundColor: Colors.black45, - radius: 28.0, - child: CircleAvatar( - backgroundColor: Colors.white, - maxRadius: 25.1, - child: Padding( - padding: const EdgeInsets.all( - 8.0), - child: Text( - '3 K.m \n away', - style: TextStyle( - color: Color(0xff30B7B9), - fontSize: 12.5, - fontWeight: FontWeight - .w600), - ), - ), - ), - ), - ) - ], - ), - ), + ) ], ), ), - ), - ); - }), - ), - ], + ], + ), + ), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + InformationPage(model.orders[index]))); + }, + ), + ); + }, + ), ), - ), + ], + ), + ), ); } } diff --git a/lib/widgets/delivery/customer_brief_card.dart b/lib/widgets/delivery/customer_brief_card.dart index 2836779..fc718b9 100644 --- a/lib/widgets/delivery/customer_brief_card.dart +++ b/lib/widgets/delivery/customer_brief_card.dart @@ -12,16 +12,20 @@ class CustomerBrief extends StatelessWidget { final String direction; final String totalPayment; final String deliveryTime; + final double longitude; + final double latitude; CustomerBrief( {this.itemId, - this.time, - this.customerFirstName, - this.customerLastName, - this.mobileNo, - this.direction, - this.totalPayment, - this.deliveryTime}); + this.time, + this.customerFirstName, + this.customerLastName, + this.mobileNo, + this.direction, + this.totalPayment, + this.deliveryTime, + this.longitude, + this.latitude}); @override Widget build(BuildContext context) { @@ -173,4 +177,4 @@ class CustomerBrief extends StatelessWidget { ), ); } -} \ No newline at end of file +} diff --git a/pubspec.yaml b/pubspec.yaml index 358a44e..6184287 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -67,6 +67,8 @@ dependencies: # Qr code Scanner barcode_scan: ^3.0.1 + #mape + map_launcher: ^0.12.0 @@ -96,3 +98,9 @@ flutter: - family: DriverApp fonts: - asset: lib/app-icons/fonts/DriverApp.ttf + + - family: Metropolis + fonts: + - asset: assets/fonts/Metropolis/Metropolis-Regular.otf + - asset: assets/fonts/Metropolis/Metropolis-Bold.otf + - asset: assets/fonts/Metropolis/Metropolis-Light.otf