From e9e3b079b35cda039cd417f97e6ca1397c321559 Mon Sep 17 00:00:00 2001 From: "Mirza.Shafique" Date: Mon, 9 Aug 2021 14:39:13 +0300 Subject: [PATCH] Medical Profile Complete 1.1 --- .../landing/fragments/home_page_fragment.dart | 3 +- .../fragments/logged_home_page_fragment.dart | 8 ++-- lib/theme/theme_value.dart | 43 ++++++++++--------- .../medical/medical_profile_item.dart | 4 +- 4 files changed, 31 insertions(+), 27 deletions(-) diff --git a/lib/pages/landing/fragments/home_page_fragment.dart b/lib/pages/landing/fragments/home_page_fragment.dart index b17d28ad..c5ad8dad 100644 --- a/lib/pages/landing/fragments/home_page_fragment.dart +++ b/lib/pages/landing/fragments/home_page_fragment.dart @@ -49,7 +49,7 @@ class _HomePageFragmentState extends State { AspectRatio( aspectRatio: 2.3, child: Container( - margin: EdgeInsets.only(left: 14,right: 14,top: 10,bottom: 10), + margin: EdgeInsets.only(left: 14, right: 14, top: 10, bottom: 10), child: SliderView( onLoginClick: () { widget.onLoginClick(); @@ -128,7 +128,6 @@ class _HomePageFragmentState extends State { ), ], ), - mHeight(140), ], ), diff --git a/lib/pages/landing/fragments/logged_home_page_fragment.dart b/lib/pages/landing/fragments/logged_home_page_fragment.dart index 17a6f71d..3e4bfd3e 100644 --- a/lib/pages/landing/fragments/logged_home_page_fragment.dart +++ b/lib/pages/landing/fragments/logged_home_page_fragment.dart @@ -105,7 +105,7 @@ class _HomePageFragmentState extends State { mHeight(16), Container( width: double.infinity, - height: MediaQuery.of(context).size.height * 0.143, + height: MediaQuery.of(context).size.width * 0.26, child: ListView.separated( itemCount: 4, padding: EdgeInsets.zero, @@ -115,10 +115,12 @@ class _HomePageFragmentState extends State { return widget.projectViewModel.isArabic ? Container( child: myMedicalList[index], + width: MediaQuery.of(context).size.width * 0.26, margin: EdgeInsets.only(left: index == 3 ? 20 : 0, right: index == 0 ? 20 : 0), ) : Container( child: myMedicalList[index], + width: MediaQuery.of(context).size.width * 0.26, margin: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == 3 ? 20 : 0), ); }, @@ -215,7 +217,7 @@ class _HomePageFragmentState extends State { mHeight(4), Container( width: double.infinity, - height: MediaQuery.of(context).size.height * 0.143, + height: MediaQuery.of(context).size.width * 0.26, child: ListView.separated( itemCount: hmgServices.length, padding: EdgeInsets.zero, @@ -223,7 +225,7 @@ class _HomePageFragmentState extends State { physics: BouncingScrollPhysics(), itemBuilder: (BuildContext context, int index) { return Container( - width: MediaQuery.of(context).size.height * 0.143, + width: MediaQuery.of(context).size.width * 0.26, margin: widget.projectViewModel.isArabic ? EdgeInsets.only(left: index == hmgServices.length - 1 ? 20 : 0, right: index == 0 ? 20 : 0) : EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == hmgServices.length - 1 ? 20 : 0), diff --git a/lib/theme/theme_value.dart b/lib/theme/theme_value.dart index 65d6f81d..4b59fc23 100644 --- a/lib/theme/theme_value.dart +++ b/lib/theme/theme_value.dart @@ -12,9 +12,11 @@ import 'package:provider/provider.dart'; final bluePrimary = Color(0xFF3F51B5); final blueAccent = Color(0xFFFF9800); final blueBackground = Color(0xFFFFFFFF); + defaultTheme({fontName}) { return ThemeData( - fontFamily: fontName, //projectProvider.isArabic ? 'Cairo' : 'WorkSans', + fontFamily: fontName, + //projectProvider.isArabic ? 'Cairo' : 'WorkSans', primarySwatch: Colors.blue, visualDensity: VisualDensity.adaptivePlatformDensity, @@ -28,7 +30,8 @@ defaultTheme({fontName}) { hintColor: Colors.grey[400], disabledColor: Colors.grey[300], errorColor: Color.fromRGBO(235, 80, 60, 1.0), - scaffoldBackgroundColor: Color(0xffE9E9E9), // Colors.grey[100], + scaffoldBackgroundColor: Color(0xffE9E9E9), + // Colors.grey[100], textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), textSelectionHandleColor: Colors.grey, canvasColor: Colors.white, @@ -39,15 +42,15 @@ defaultTheme({fontName}) { buttonColor: Colors.black, toggleableActiveColor: secondaryColor, indicatorColor: secondaryColor, - bottomSheetTheme: - BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), + bottomSheetTheme: BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), cursorColor: Colors.grey, primaryTextTheme: TextTheme(bodyText2: TextStyle(color: Colors.white)), iconTheme: IconThemeData(), textTheme: TextTheme( - bodyText1: TextStyle(color: Colors.black), - headline1: TextStyle(color: Colors.white), - headline2: TextStyle(color: Colors.white)), + bodyText1: TextStyle(color: Colors.black, letterSpacing: 0.6), + headline1: TextStyle(color: Colors.white, letterSpacing: 0.6), + headline2: TextStyle(color: Colors.white, letterSpacing: 0.6), + ), floatingActionButtonTheme: FloatingActionButtonThemeData(highlightElevation: 2, disabledElevation: 0, elevation: 2), appBarTheme: AppBarTheme( @@ -63,7 +66,8 @@ defaultTheme({fontName}) { invertThemes({fontName}) { return ThemeData( - fontFamily: fontName, //projectProvider.isArabic ? 'Cairo' : 'WorkSans', + fontFamily: fontName, + //projectProvider.isArabic ? 'Cairo' : 'WorkSans', primarySwatch: Colors.blue, visualDensity: VisualDensity.adaptivePlatformDensity, @@ -75,13 +79,11 @@ invertThemes({fontName}) { }, ), hintColor: Colors.grey[400], - textTheme: TextTheme( - bodyText1: TextStyle(color: Colors.white), - headline1: TextStyle(color: Colors.white), - headline2: TextStyle(color: Colors.white)), + textTheme: TextTheme(bodyText1: TextStyle(color: Colors.white), headline1: TextStyle(color: Colors.white), headline2: TextStyle(color: Colors.white)), disabledColor: Colors.grey[800], errorColor: Color.fromRGBO(235, 80, 60, 1.0), - scaffoldBackgroundColor: Color(0xff000000), // Colors.grey[100], + scaffoldBackgroundColor: Color(0xff000000), + // Colors.grey[100], textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), textSelectionHandleColor: Colors.grey, canvasColor: Colors.black, @@ -92,8 +94,7 @@ invertThemes({fontName}) { buttonColor: Colors.black, toggleableActiveColor: secondaryColor, indicatorColor: secondaryColor, - bottomSheetTheme: - BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), + bottomSheetTheme: BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), cursorColor: Colors.black, iconTheme: IconThemeData(), appBarTheme: AppBarTheme( @@ -109,7 +110,8 @@ invertThemes({fontName}) { bwThemes({fontName}) { return ThemeData( - fontFamily: fontName, //projectProvider.isArabic ? 'Cairo' : 'WorkSans', + fontFamily: fontName, + //projectProvider.isArabic ? 'Cairo' : 'WorkSans', primarySwatch: Colors.blue, visualDensity: VisualDensity.adaptivePlatformDensity, @@ -136,7 +138,8 @@ bwThemes({fontName}) { disabledColor: Colors.grey[800], errorColor: Color.fromRGBO(235, 80, 60, 1.0), - scaffoldBackgroundColor: Color(0xffffffe4), // Colors.grey[100], + scaffoldBackgroundColor: Color(0xffffffe4), + // Colors.grey[100], textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), textSelectionHandleColor: Colors.grey, canvasColor: Colors.black, @@ -146,8 +149,7 @@ bwThemes({fontName}) { primaryColor: Color(0xfffffff4), toggleableActiveColor: secondaryColor, indicatorColor: secondaryColor, - bottomSheetTheme: - BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), + bottomSheetTheme: BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), cursorColor: Colors.black, iconTheme: IconThemeData(), appBarTheme: AppBarTheme( @@ -163,7 +165,8 @@ bwThemes({fontName}) { dimTheme({fontName}) { return ThemeData( - fontFamily: fontName, //projectProvider.isArabic ? 'Cairo' : 'WorkSans', + fontFamily: fontName, + //projectProvider.isArabic ? 'Cairo' : 'WorkSans', primarySwatch: Colors.blue, visualDensity: VisualDensity.adaptivePlatformDensity, brightness: Brightness.dark, diff --git a/lib/widgets/data_display/medical/medical_profile_item.dart b/lib/widgets/data_display/medical/medical_profile_item.dart index 80784b74..7a5addb7 100644 --- a/lib/widgets/data_display/medical/medical_profile_item.dart +++ b/lib/widgets/data_display/medical/medical_profile_item.dart @@ -30,8 +30,8 @@ class MedicalProfileItem extends StatelessWidget { Widget build(BuildContext context) { //ProjectViewModel projectViewModel = Provider.of(context); return Container( - height: MediaQuery.of(context).size.height * 0.143, - width: MediaQuery.of(context).size.height * 0.143, + height: double.infinity, + width: double.infinity, margin: EdgeInsets.all(0), decoration: containerColorRadiusBorderWidth(Colors.white, 20, CustomColors.pharmacyGreyColor, 1), clipBehavior: Clip.antiAlias,