diff --git a/lib/pages/dashboard/dashboard_screen.dart b/lib/pages/dashboard/dashboard_screen.dart index 3ca2e86..96f0ffb 100644 --- a/lib/pages/dashboard/dashboard_screen.dart +++ b/lib/pages/dashboard/dashboard_screen.dart @@ -12,6 +12,7 @@ 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 @@ -95,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( @@ -114,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', @@ -150,20 +145,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, ), ], ), @@ -183,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( @@ -198,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, @@ -242,7 +232,7 @@ class _DashboardScreenState extends State { MediaQuery.of(context).size.width * 0.20, scale: 0.9, - fit: BoxFit.cover, + fit: BoxFit.contain, ), ], ), @@ -264,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: [ @@ -287,44 +271,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, ), ), ), @@ -395,6 +376,7 @@ 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, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -402,11 +384,11 @@ class _DashboardScreenState 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: @@ -428,7 +410,7 @@ class _DashboardScreenState extends State { CrossAxisAlignment.start, children: [ Padding( - padding: EdgeInsets.only(top: 5.0), + padding: EdgeInsets.only(top: 10.0), child: Text( model.orders[index].firstName + ' ' + @@ -447,8 +429,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)), ), ), ], @@ -461,11 +443,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 b01d301..3e5a6a3 100644 --- a/lib/pages/orders/pending_orders_page.dart +++ b/lib/pages/orders/pending_orders_page.dart @@ -34,6 +34,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, @@ -41,11 +42,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: @@ -65,7 +66,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 + ' ' + @@ -83,8 +84,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)), ), ), ], @@ -101,7 +103,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(