diff --git a/lib/pages/dashboard/dashboard_screen.dart b/lib/pages/dashboard/dashboard_screen.dart index 8b5cf96..08cf7b1 100644 --- a/lib/pages/dashboard/dashboard_screen.dart +++ b/lib/pages/dashboard/dashboard_screen.dart @@ -14,7 +14,7 @@ import 'package:driverapp/widgets/others/rounded_container.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; - +import 'package:driverapp/config/size_config.dart'; import '../base/base_view.dart'; class DashboardScreen extends StatefulWidget { @@ -100,7 +100,10 @@ class _DashboardScreenState extends State { Padding( padding: EdgeInsets.symmetric(horizontal: 10.0), child: Container( - height: MediaQuery.of(context).size.height * 0.16, + height: MediaQuery.of(context).orientation == + Orientation.portrait + ? MediaQuery.of(context).size.height * 0.16 + : MediaQuery.of(context).size.height * 0.30, width: MediaQuery.of(context).size.width * 0.44, decoration: BoxDecoration( borderRadius: BorderRadius.circular(15.0), @@ -123,20 +126,26 @@ class _DashboardScreenState extends State { TranslationBase.of(context).youHave, style: TextStyle( color: Colors.white, - fontSize: 10.0), + fontSize: + SizeConfig.textMultiplier * + 2.2), ), Text( '5', style: TextStyle( color: Colors.white, - fontSize: 25.0), + fontSize: + SizeConfig.textMultiplier * + 4.0), ), Text( TranslationBase.of(context) .undeliveredPackages, style: TextStyle( color: Colors.white, - fontSize: 9.5), + fontSize: + SizeConfig.textMultiplier * + 2.2), ) ], ), @@ -157,9 +166,16 @@ class _DashboardScreenState extends State { Image.asset( 'assets/images/closed_box.png', height: MediaQuery.of(context) - .size - .height * - 0.10, + .orientation == + Orientation.portrait + ? MediaQuery.of(context) + .size + .height * + 0.10 + : MediaQuery.of(context) + .size + .height * + 0.20, width: MediaQuery.of(context) .size .width * @@ -184,7 +200,10 @@ class _DashboardScreenState extends State { Padding( padding: EdgeInsets.symmetric(horizontal: 10.0), child: Container( - height: MediaQuery.of(context).size.height * 0.16, + height: MediaQuery.of(context).orientation == + Orientation.portrait + ? MediaQuery.of(context).size.height * 0.16 + : MediaQuery.of(context).size.height * 0.30, width: MediaQuery.of(context).size.width * 0.45, decoration: BoxDecoration( borderRadius: BorderRadius.circular(15.0), @@ -207,20 +226,26 @@ class _DashboardScreenState extends State { TranslationBase.of(context).youHave, style: TextStyle( color: Colors.white, - fontSize: 10.0), + fontSize: + SizeConfig.textMultiplier * + 2.2), ), Text( '25', style: TextStyle( color: Colors.white, - fontSize: 25.0), + fontSize: + SizeConfig.textMultiplier * + 4.0), ), Text( TranslationBase.of(context) .deliveredPackages, style: TextStyle( color: Colors.white, - fontSize: 10.0), + fontSize: + SizeConfig.textMultiplier * + 2.2), ) ], ), @@ -241,9 +266,16 @@ class _DashboardScreenState extends State { Image.asset( 'assets/images/opend_box.png', height: MediaQuery.of(context) - .size - .height * - 0.10, + .orientation == + Orientation.portrait + ? MediaQuery.of(context) + .size + .height * + 0.10 + : MediaQuery.of(context) + .size + .height * + 0.20, width: MediaQuery.of(context) .size .width * @@ -274,7 +306,7 @@ class _DashboardScreenState extends State { height: MediaQuery.of(context).orientation == Orientation.portrait ? MediaQuery.of(context).size.height * 0.18 - : MediaQuery.of(context).size.height * 0.28, + : MediaQuery.of(context).size.height * 0.30, width: MediaQuery.of(context).size.width * 0.50, decoration: BoxDecoration( borderRadius: BorderRadius.circular(15.0), @@ -295,8 +327,13 @@ class _DashboardScreenState extends State { 'assets/images/qr_code.png', width: MediaQuery.of(context).size.width * 0.26, - height: MediaQuery.of(context).size.height * - 0.14, + height: MediaQuery.of(context) + .orientation == + Orientation.portrait + ? MediaQuery.of(context).size.height * + 0.14 + : MediaQuery.of(context).size.height * + 0.28, fit: BoxFit.contain, ) ], @@ -315,7 +352,8 @@ class _DashboardScreenState extends State { child: Text( TranslationBase.of(context).scan, style: TextStyle( - fontSize: 35.0, + fontSize: + SizeConfig.textMultiplier * 6.0, color: Colors.white, fontWeight: FontWeight.w400, ), @@ -328,7 +366,8 @@ class _DashboardScreenState extends State { TranslationBase.of(context) .toAddPackageToQue, style: TextStyle( - fontSize: 15.0, + fontSize: + SizeConfig.textMultiplier * 3.0, color: Colors.white, letterSpacing: 0.2, wordSpacing: 0.5, @@ -478,13 +517,6 @@ class _DashboardScreenState extends State { fontSize: 15.0, ), ), - Expanded( - child: Text( - 'Olaya ST, Behind kfc next to king , ', - style: TextStyle( - color: Color(0xff636363)), - ), - ), ], ), ), diff --git a/lib/pages/orders/pending_orders_page.dart b/lib/pages/orders/pending_orders_page.dart index acfe0a5..69c4c15 100644 --- a/lib/pages/orders/pending_orders_page.dart +++ b/lib/pages/orders/pending_orders_page.dart @@ -96,13 +96,6 @@ class _OrdersListScreenState extends State { fontSize: 15.0, ), ), - Expanded( - child: Text( - 'Olaya ST, Behind kfc next to king', - style: - TextStyle(color: Color(0xff636363)), - ), - ), ], ), ),