From 3bd4f17d5706a65254178a089249352f5b0742fd Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 31 Aug 2020 16:08:35 +0300 Subject: [PATCH 1/2] dashboard design update --- lib/pages/dashboard/dashboard_screen.dart | 147 ++++++++++------------ lib/pages/orders/pending_orders_page.dart | 16 +-- 2 files changed, 72 insertions(+), 91 deletions(-) diff --git a/lib/pages/dashboard/dashboard_screen.dart b/lib/pages/dashboard/dashboard_screen.dart index 9f58d6c..d707ddb 100644 --- a/lib/pages/dashboard/dashboard_screen.dart +++ b/lib/pages/dashboard/dashboard_screen.dart @@ -9,8 +9,8 @@ import 'package:driverapp/widgets/others/app_scaffold_widget.dart'; import 'package:driverapp/widgets/others/rounded_container.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import '../base/base_view.dart'; +import 'package:driverapp/config/shared_pref_kay.dart'; class DashboardScreen extends StatefulWidget { @override @@ -94,14 +94,8 @@ class _DashboardScreenState extends State { 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, + 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( @@ -113,9 +107,9 @@ class _DashboardScreenState extends State { Expanded( child: Padding( padding: EdgeInsets.all(2.0), - child: Column( - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, + child: Column( + mainAxisAlignment: + MainAxisAlignment.spaceEvenly, children: [ Text( 'You Have', @@ -149,20 +143,16 @@ class _DashboardScreenState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Image.asset( - 'assets/images/closed_box.png', - height: MediaQuery - .of(context) - .size - .height * + Image.asset( + 'assets/images/closed_box.png', + height: + MediaQuery.of(context).size.height * 0.10, - width: MediaQuery - .of(context) - .size - .width * + width: + MediaQuery.of(context).size.width * 0.20, scale: 0.9, - fit: BoxFit.cover, + fit: BoxFit.contain, ), ], ), @@ -182,10 +172,7 @@ class _DashboardScreenState extends State { padding: EdgeInsets.symmetric(horizontal: 10.0), child: Container( height: MediaQuery.of(context).size.height * 0.16, - width: MediaQuery - .of(context) - .size - .width * 0.45, + width: MediaQuery.of(context).size.width * 0.45, decoration: BoxDecoration( borderRadius: BorderRadius.circular(15.0), gradient: LinearGradient( @@ -197,21 +184,23 @@ class _DashboardScreenState extends State { Expanded( child: Padding( padding: EdgeInsets.all(2.0), - child: Column( - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, - children: [ - Text( - 'You Have', - style: TextStyle( - color: Colors.white, fontSize: 10.0), - ), - Text( - '25', - style: TextStyle( - color: Colors.white, fontSize: 25.0), - ), - Text( + child: Column( + mainAxisAlignment: + MainAxisAlignment.spaceEvenly, + children: [ + Text( + 'You Have', + style: TextStyle( + color: Colors.white, + fontSize: 10.0), + ), + Text( + '25', + style: TextStyle( + color: Colors.white, + fontSize: 25.0), + ), + Text( 'Succesful\nDeliveries', style: TextStyle( color: Colors.white, @@ -241,7 +230,7 @@ class _DashboardScreenState extends State { MediaQuery.of(context).size.width * 0.20, scale: 0.9, - fit: BoxFit.cover, + fit: BoxFit.contain, ), ], ), @@ -263,14 +252,8 @@ class _DashboardScreenState extends State { Expanded( child: InkWell( child: Container( - height: MediaQuery - .of(context) - .size - .height * 0.18, - width: MediaQuery - .of(context) - .size - .width * 0.50, + height: MediaQuery.of(context).size.height * 0.18, + width: MediaQuery.of(context).size.width * 0.50, decoration: BoxDecoration( borderRadius: BorderRadius.circular(15.0), gradient: LinearGradient(colors: [ @@ -286,44 +269,41 @@ class _DashboardScreenState extends State { Image.asset( 'assets/images/qr_code.png', width: - MediaQuery - .of(context) - .size - .width * 0.26, + MediaQuery.of(context).size.width * 0.26, height: - MediaQuery - .of(context) - .size - .height * 0.14, + MediaQuery.of(context).size.height * 0.14, fit: BoxFit.contain, ) ], ), Column( - mainAxisAlignment: MainAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, children: [ InkWell( onTap: () { _scanQrAndGetPatient(context, model); }, - child: Text( - 'SCAN', - style: TextStyle( - fontSize: 35.0, - color: Colors.white, - fontWeight: FontWeight.w400), + child: Padding( + padding: EdgeInsets.only(top: 8.0), + child: Text( + 'SCAN', + style: TextStyle( + fontSize: 35.0, + color: Colors.white, + fontWeight: FontWeight.w400), + ), ), ), Padding( - padding: EdgeInsets.only(top: 6.0), + padding: EdgeInsets.only(top: 0.0), child: Text( 'To add package to que ', style: TextStyle( - fontSize: 12.0, + fontSize: 15.0, color: Colors.white, - letterSpacing: 0.5, - wordSpacing: 5.5, + letterSpacing: 0.2, + wordSpacing: 0.5, ), ), ), @@ -372,10 +352,10 @@ class _DashboardScreenState extends State { ], ), onTap: () => Navigator.push( - context, - MaterialPageRoute( - builder: (context) => OrdersListScreen()), - )), + context, + MaterialPageRoute( + builder: (context) => OrdersListScreen()), + )), ], ), ], @@ -392,21 +372,19 @@ class _DashboardScreenState extends State { padding: EdgeInsets.symmetric(horizontal: 12.2), child: InkWell( child: RoundedContainer( - height: MediaQuery - .of(context) - .size - .height * 0.109, + raduis: 25.0, + height: MediaQuery.of(context).size.height * 0.109, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Expanded( flex: 1, child: Column( - mainAxisAlignment: MainAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, children: [ Padding( padding: EdgeInsets.only( - left: 10.0, bottom: 5.0), + left: 10.0, bottom: 5.0, top: 10.0), child: Image.asset( 'assets/images/location.png', height: @@ -426,7 +404,7 @@ class _DashboardScreenState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: EdgeInsets.only(top: 5.0), + padding: EdgeInsets.only(top: 10.0), child: Text( model.orders[index].firstName + ' ' + @@ -445,7 +423,8 @@ class _DashboardScreenState extends State { Expanded( child: Text( 'Olaya ST, Behind kfc next to king , ', - style: TextStyle(color: Colors.black45), + style: + TextStyle(color: Color(0xff636363)), ), ), ], @@ -458,11 +437,11 @@ class _DashboardScreenState extends State { children: [ Expanded( child: CircleAvatar( - backgroundColor: Colors.black45, + backgroundColor: Color(0xff707070), radius: 28.0, child: CircleAvatar( backgroundColor: Colors.white, - maxRadius: 25.1, + maxRadius: 25.0, child: Padding( padding: const EdgeInsets.all(8.0), child: Text( diff --git a/lib/pages/orders/pending_orders_page.dart b/lib/pages/orders/pending_orders_page.dart index 4d265b3..fe4ef74 100644 --- a/lib/pages/orders/pending_orders_page.dart +++ b/lib/pages/orders/pending_orders_page.dart @@ -20,7 +20,7 @@ class _OrdersListScreenState extends State { Scaffold( appBar: AppBar( centerTitle: true, - backgroundColor: Color(0xffF4F9FA), + backgroundColor: Color(0xffEFF5F5), title: Text( 'Your Delivery Que', ), @@ -37,6 +37,7 @@ class _OrdersListScreenState extends State { padding: EdgeInsets.symmetric(horizontal: 12.2), child: InkWell( child: RoundedContainer( + raduis: 25.0, height: MediaQuery.of(context).size.height * 0.109, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -44,11 +45,11 @@ class _OrdersListScreenState extends State { Expanded( flex: 1, child: Column( - mainAxisAlignment: MainAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, children: [ Padding( padding: EdgeInsets.only( - left: 10.0, bottom: 5.0), + left: 10.0, bottom: 5.0, top: 10.0), child: Image.asset( 'assets/images/location.png', height: @@ -68,7 +69,7 @@ class _OrdersListScreenState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: EdgeInsets.only(top: 5.0), + padding: EdgeInsets.only(top: 10.0), child: Text( model.orders[index].firstName + ' ' + @@ -86,8 +87,9 @@ class _OrdersListScreenState extends State { ), Expanded( child: Text( - 'Olaya ST, Behind kfc next to king ,', - style: TextStyle(color: Colors.black45), + 'Olaya ST, Behind kfc next to king , ', + style: + TextStyle(color: Color(0xff636363)), ), ), ], @@ -104,7 +106,7 @@ class _OrdersListScreenState extends State { radius: 28.0, child: CircleAvatar( backgroundColor: Colors.white, - maxRadius: 24.1, + maxRadius: 25.0, child: Padding( padding: const EdgeInsets.all(8.0), child: Text( From b8145624958d3866d414180fae2ac50aa085f429 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 31 Aug 2020 16:44:40 +0300 Subject: [PATCH 2/2] merge conflect --- lib/pages/dashboard/dashboard_screen.dart | 104 +++++++++------------- 1 file changed, 41 insertions(+), 63 deletions(-) diff --git a/lib/pages/dashboard/dashboard_screen.dart b/lib/pages/dashboard/dashboard_screen.dart index d14c211..96f0ffb 100644 --- a/lib/pages/dashboard/dashboard_screen.dart +++ b/lib/pages/dashboard/dashboard_screen.dart @@ -96,14 +96,8 @@ class _DashboardScreenState extends State { 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, + 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( @@ -115,9 +109,9 @@ class _DashboardScreenState extends State { Expanded( child: Padding( padding: EdgeInsets.all(2.0), - child: Column( - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, + child: Column( + mainAxisAlignment: + MainAxisAlignment.spaceEvenly, children: [ Text( 'You Have', @@ -151,17 +145,13 @@ class _DashboardScreenState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Image.asset( - 'assets/images/closed_box.png', - height: MediaQuery - .of(context) - .size - .height * + Image.asset( + 'assets/images/closed_box.png', + height: + MediaQuery.of(context).size.height * 0.10, - width: MediaQuery - .of(context) - .size - .width * + width: + MediaQuery.of(context).size.width * 0.20, scale: 0.9, fit: BoxFit.contain, @@ -184,10 +174,7 @@ class _DashboardScreenState extends State { padding: EdgeInsets.symmetric(horizontal: 10.0), child: Container( height: MediaQuery.of(context).size.height * 0.16, - width: MediaQuery - .of(context) - .size - .width * 0.45, + width: MediaQuery.of(context).size.width * 0.45, decoration: BoxDecoration( borderRadius: BorderRadius.circular(15.0), gradient: LinearGradient( @@ -199,21 +186,23 @@ class _DashboardScreenState extends State { Expanded( child: Padding( padding: EdgeInsets.all(2.0), - child: Column( - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, - children: [ - Text( - 'You Have', - style: TextStyle( - color: Colors.white, fontSize: 10.0), - ), - Text( - '25', - style: TextStyle( - color: Colors.white, fontSize: 25.0), - ), - Text( + child: Column( + mainAxisAlignment: + MainAxisAlignment.spaceEvenly, + children: [ + Text( + 'You Have', + style: TextStyle( + color: Colors.white, + fontSize: 10.0), + ), + Text( + '25', + style: TextStyle( + color: Colors.white, + fontSize: 25.0), + ), + Text( 'Succesful\nDeliveries', style: TextStyle( color: Colors.white, @@ -265,14 +254,8 @@ class _DashboardScreenState extends State { Expanded( child: InkWell( child: Container( - height: MediaQuery - .of(context) - .size - .height * 0.18, - width: MediaQuery - .of(context) - .size - .width * 0.50, + height: MediaQuery.of(context).size.height * 0.18, + width: MediaQuery.of(context).size.width * 0.50, decoration: BoxDecoration( borderRadius: BorderRadius.circular(15.0), gradient: LinearGradient(colors: [ @@ -288,15 +271,9 @@ class _DashboardScreenState extends State { Image.asset( 'assets/images/qr_code.png', width: - MediaQuery - .of(context) - .size - .width * 0.26, + MediaQuery.of(context).size.width * 0.26, height: - MediaQuery - .of(context) - .size - .height * 0.14, + MediaQuery.of(context).size.height * 0.14, fit: BoxFit.contain, ) ], @@ -377,10 +354,10 @@ class _DashboardScreenState extends State { ], ), onTap: () => Navigator.push( - context, - MaterialPageRoute( - builder: (context) => OrdersListScreen()), - )), + context, + MaterialPageRoute( + builder: (context) => OrdersListScreen()), + )), ], ), ], @@ -399,7 +376,8 @@ class _DashboardScreenState extends State { padding: EdgeInsets.symmetric(horizontal: 12.2), child: InkWell( child: RoundedContainer( - raduis: 25.0,height: MediaQuery.of(context).size.height * 0.109, + raduis: 25.0, + height: MediaQuery.of(context).size.height * 0.109, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -451,8 +429,8 @@ class _DashboardScreenState extends State { Expanded( child: Text( 'Olaya ST, Behind kfc next to king , ', - style: - TextStyle(color: Color(0xff636363)), + style: TextStyle( + color: Color(0xff636363)), ), ), ],