From 634c874eee1fb5fc7e5b6acdf323388776f288da Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Wed, 13 Jan 2021 10:02:39 +0200 Subject: [PATCH] fix design issues --- assets/images/new-design/covid-19-car.svg | 26 ++++ lib/config/localized_values.dart | 8 ++ lib/core/service/client/base_app_client.dart | 10 +- .../ComprehensiveMedicalCheckup/cmc_page.dart | 2 +- .../E-Referral/e_referral_page.dart | 2 +- .../HomeHealthCare/home_health_care_page.dart | 2 +- .../AlHabibMedicalService/h2o/h2o_page.dart | 2 +- lib/pages/ErService/AmbulanceReq.dart | 2 +- lib/pages/feedback/feedback_home_page.dart | 2 +- lib/pages/landing/home_page.dart | 125 +++++++----------- lib/pages/medical/eye/EyeHomePage.dart | 2 +- .../my_trackers/Weight/WeightHomePage.dart | 2 +- .../blood_pressure/BloodPressureHomePage.dart | 2 +- .../blood_suger/blood_sugar_home_page.dart | 2 +- .../prescriptions_home_page.dart | 8 +- .../medical/reports/report_home_page.dart | 2 +- lib/uitl/translations_delegate_base.dart | 2 + .../medical/medical_profile_item.dart | 1 - 18 files changed, 99 insertions(+), 103 deletions(-) create mode 100644 assets/images/new-design/covid-19-car.svg diff --git a/assets/images/new-design/covid-19-car.svg b/assets/images/new-design/covid-19-car.svg new file mode 100644 index 00000000..b5c9cb85 --- /dev/null +++ b/assets/images/new-design/covid-19-car.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 387dbcb1..a019ae00 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1449,4 +1449,12 @@ const Map localizedValues = { "en": "View List of Children", "ar": "عرض قائمة الأطفال" }, + "covidTest": { + "en": "COVID-19 TEST", + "ar": "فحص كورونا" + }, + "driveThru": { + "en": "Drive-Thru", + "ar": "من السيارة" + }, }; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 04f599f1..8995a4e3 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -58,15 +58,7 @@ class BaseAppClient { body['VersionID'] = VERSION_ID; body['Channel'] = CHANNEL; - body['LanguageID'] = body.containsKey('LanguageID') - ? body['LanguageID'] != null - ? body['LanguageID'] - : languageID == 'ar' - ? 1 - : 2 - : languageID == 'en' - ? 2 - : 1; + body['LanguageID'] = languageID == 'ar' ? 1 : 2; body['IPAdress'] = IP_ADDRESS; body['generalid'] = GENERAL_ID; diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart index 385d0da3..95d02d1f 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart @@ -78,7 +78,7 @@ class _CMCPageState extends State isScrollable: true, controller: _tabController, indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, indicatorColor: Colors.red[800], labelColor: Theme.of(context).primaryColor, labelPadding: diff --git a/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart index 9f836860..a0583434 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart @@ -78,7 +78,7 @@ class _EReferralPageState extends State isScrollable: true, controller: _tabController, indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, indicatorColor: Colors.red[800], labelColor: Theme.of(context).primaryColor, labelPadding: diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart index 8f4821f6..f0dcee7c 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart @@ -80,7 +80,7 @@ class _HomeHealthCarePageState extends State isScrollable: true, controller: _tabController, indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, indicatorColor: Colors.red[800], labelColor: Theme.of(context).primaryColor, labelPadding: diff --git a/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart b/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart index ad2c6ece..8ac7b437 100644 --- a/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart +++ b/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart @@ -68,7 +68,7 @@ class _H2OPageState extends State isScrollable: false, controller: _tabController, indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, indicatorColor: Colors.red[800], labelColor: Theme.of(context).primaryColor, labelPadding: diff --git a/lib/pages/ErService/AmbulanceReq.dart b/lib/pages/ErService/AmbulanceReq.dart index 1690254a..3d4192c5 100644 --- a/lib/pages/ErService/AmbulanceReq.dart +++ b/lib/pages/ErService/AmbulanceReq.dart @@ -92,7 +92,7 @@ class _AmbulanceReqState extends State isScrollable: true, controller: _tabController, indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, indicatorColor: Colors.red[800], labelColor: Theme.of(context).primaryColor, labelPadding: diff --git a/lib/pages/feedback/feedback_home_page.dart b/lib/pages/feedback/feedback_home_page.dart index 309b5713..fe22b44a 100644 --- a/lib/pages/feedback/feedback_home_page.dart +++ b/lib/pages/feedback/feedback_home_page.dart @@ -73,7 +73,7 @@ class _FeedbackHomePageState extends State isScrollable: true, controller: _tabController, indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, indicatorColor: Colors.red[800], labelColor: Theme.of(context).primaryColor, labelPadding: diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index cd8a8a2d..bcddd10c 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -73,7 +73,7 @@ class _HomePageState extends State { children: [ Expanded( child: Container( - height: 120, + height: 125, padding: EdgeInsets.all(5), margin: EdgeInsets.all(5), decoration: BoxDecoration( @@ -87,72 +87,50 @@ class _HomePageState extends State { borderRadius: BorderRadius.all( Radius.circular(5))), child: Container( - margin: EdgeInsets.only(top: 10.0), + child: Column( children: [ - Text("COVID-19 TEST", - style: TextStyle( - color: Colors.white, - fontWeight: - FontWeight.bold, - fontSize: 18.0)), + Texts(TranslationBase.of(context).covidTest, + color: Colors.white, + fontWeight: FontWeight.w700, + ), Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Container( margin: EdgeInsets.only( - top: 15.0, left: 3.5, right: 3.5), + top: 15.0,), child: SvgPicture.asset( 'assets/images/new-design/covid-19-car.svg', width: 45.0, height: 45.0), ), Container( - margin: EdgeInsets.only( - left: 10.0, - top: 10.0), + margin: EdgeInsets.only(top: 5.0), child: Column( children: [ - Text("Drive-Thru", - style: TextStyle( - color: Colors - .white, - fontWeight: - FontWeight - .bold, - fontSize: - 16.0)), + Texts(TranslationBase.of(context).driveThru, + fontWeight: FontWeight.w700, + color: Colors.white,), ButtonTheme( - shape: - RoundedRectangleBorder( + shape: RoundedRectangleBorder( borderRadius: - BorderRadius - .circular( - 5.0), - ), - minWidth: MediaQuery.of( - context) - .size - .width * - 0.15, + BorderRadius.circular(5.0),), + minWidth: MediaQuery.of(context).size.width * 0.15, height: 25.0, child: RaisedButton( - color: Colors - .red[800], - textColor: - Colors.white, - disabledTextColor: - Colors.white, - disabledColor: - new Color( - 0xFFbcc2c4), + color: Colors.red[800], + textColor: Colors.white, + disabledTextColor: Colors.white, + disabledColor: new Color(0xFFbcc2c4), onPressed: () { navigateToCovidDriveThru(); }, - child: Text( - "BOOK NOW", - style: TextStyle( - fontSize: - 12.0)), + child: Texts( + TranslationBase.of(context).bookNow, + fontWeight: FontWeight.w700, + color: Colors.white, + ), ), ), ], @@ -170,7 +148,7 @@ class _HomePageState extends State { onTap: () => Navigator.push(context, FadePage(page: LiveCareHome())), child: Container( - height: 120, + height: 125, padding: EdgeInsets.all(15), margin: EdgeInsets.all(5), decoration: BoxDecoration( @@ -208,7 +186,7 @@ class _HomePageState extends State { Orientation.landscape ? 0.02 : 0.03), - child: (!model.isLogin && projectViewModel.user == null) + child: (!model.isLogin) ? Container( width: double.infinity, height: 125, @@ -229,17 +207,15 @@ class _HomePageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox( - height: 8, + height: 2, ), Texts( TranslationBase.of(context).myMedicalFile, color: Colors.black87, - bold: true, + fontWeight: FontWeight.w700, fontSize: 23, ), - SizedBox( - height: 5, - ), + Texts( TranslationBase.of(context) .myMedicalFileSubTitle, @@ -248,14 +224,14 @@ class _HomePageState extends State { ), Align( alignment: projectViewModel.isArabic - ? Alignment.bottomRight - : Alignment.bottomLeft, + ? Alignment.bottomLeft + : Alignment.bottomRight, child: InkWell( onTap: () { widget.goToMyProfile(); }, child: Container( - margin: EdgeInsets.all(2), + margin: EdgeInsets.only(left: 15,right: 15), width: 90, height: 30, decoration: BoxDecoration( @@ -265,13 +241,13 @@ class _HomePageState extends State { color: Colors.transparent, width: 0.5), borderRadius: BorderRadius.all( - Radius.circular(9)), + Radius.circular(0)), ), child: Center( child: Texts( - TranslationBase.of(context) - .viewMore, + TranslationBase.of(context).viewMore, color: Colors.white, + fontWeight: FontWeight.w700, fontSize: 12, ), ), @@ -303,7 +279,7 @@ class _HomePageState extends State { children: [ Row( children: [ - if (model.user != null) + if (projectViewModel.user != null && model.isLogin) Expanded( child: Column( crossAxisAlignment: @@ -368,13 +344,9 @@ class _HomePageState extends State { ], ), Row( - //crossAxisAlignment: CrossAxisAlignment.center, - //mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Expanded( child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, children: [ Image.asset( 'assets/images/height_icon.png', @@ -384,6 +356,7 @@ class _HomePageState extends State { Texts( "${model.heightCm}", color: Colors.white, + fontSize: 17, ) ], ), @@ -393,8 +366,6 @@ class _HomePageState extends State { ), Expanded( child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, children: [ Image.asset( 'assets/images/weight_icon.png', @@ -404,6 +375,7 @@ class _HomePageState extends State { Texts( '${model.weightKg}', color: Colors.white, + fontSize: 17 ) ], ), @@ -467,12 +439,11 @@ class _HomePageState extends State { height: 3, ), Texts( - TranslationBase.of(context) - .homeHealthCareService, + TranslationBase.of(context).homeHealthCareService, textAlign: TextAlign.center, color: Colors.white, - bold: true, - fontSize: SizeConfig.textMultiplier * 1.7, + fontWeight: FontWeight.w700, + fontSize: SizeConfig.textMultiplier * 1.55, ) ], ), @@ -503,8 +474,8 @@ class _HomePageState extends State { TranslationBase.of(context).onlinePharmacy, textAlign: TextAlign.center, color: Colors.white, - bold: true, - fontSize: SizeConfig.textMultiplier * 1.7, + fontWeight: FontWeight.w700, + fontSize: SizeConfig.textMultiplier * 1.55, ) ], ), @@ -540,8 +511,8 @@ class _HomePageState extends State { TranslationBase.of(context).emergencyService, textAlign: TextAlign.center, color: Colors.white, - bold: true, - fontSize: SizeConfig.textMultiplier * 1.7, + fontWeight: FontWeight.w700, + fontSize: SizeConfig.textMultiplier * 1.55, ) ], ), @@ -811,10 +782,8 @@ class DashboardItem extends StatelessWidget { onTap: onTap, child: Container( width: width != null ? width : MediaQuery.of(context).size.width * 0.29, - height: height != null - ? height - : MediaQuery.of(context).orientation == Orientation.portrait - ? MediaQuery.of(context).size.height * 0.19 + height: height != null ? height : MediaQuery.of(context).orientation == Orientation.portrait + ? MediaQuery.of(context).size.height * 0.17 : MediaQuery.of(context).size.height * 0.35, decoration: BoxDecoration( color: !hasBorder diff --git a/lib/pages/medical/eye/EyeHomePage.dart b/lib/pages/medical/eye/EyeHomePage.dart index 3f4df55f..bce778b8 100644 --- a/lib/pages/medical/eye/EyeHomePage.dart +++ b/lib/pages/medical/eye/EyeHomePage.dart @@ -74,7 +74,7 @@ class _EyeHomePageState extends State isScrollable: true, controller: _tabController, indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, labelColor: Theme.of(context).primaryColor, labelPadding: EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0), diff --git a/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart b/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart index 8e6f808c..9bd89a2c 100644 --- a/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart +++ b/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart @@ -70,7 +70,7 @@ class _WeightHomePageState extends State isScrollable: true, controller: _tabController, indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, indicatorColor: Colors.red[800], labelColor: Theme.of(context).primaryColor, labelPadding: diff --git a/lib/pages/medical/my_trackers/blood_pressure/BloodPressureHomePage.dart b/lib/pages/medical/my_trackers/blood_pressure/BloodPressureHomePage.dart index e6bb3ed4..de8bb509 100644 --- a/lib/pages/medical/my_trackers/blood_pressure/BloodPressureHomePage.dart +++ b/lib/pages/medical/my_trackers/blood_pressure/BloodPressureHomePage.dart @@ -73,7 +73,7 @@ class _BloodPressureHomePageState extends State isScrollable: true, controller: _tabController, indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, labelColor: Theme.of(context).primaryColor, labelPadding: EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0), diff --git a/lib/pages/medical/my_trackers/blood_suger/blood_sugar_home_page.dart b/lib/pages/medical/my_trackers/blood_suger/blood_sugar_home_page.dart index 9259e286..71df9a3a 100644 --- a/lib/pages/medical/my_trackers/blood_suger/blood_sugar_home_page.dart +++ b/lib/pages/medical/my_trackers/blood_suger/blood_sugar_home_page.dart @@ -74,7 +74,7 @@ class _BloodSugarHomePageState extends State isScrollable: true, controller: _tabController, indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, labelColor: Theme.of(context).primaryColor, labelPadding: EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0), diff --git a/lib/pages/medical/prescriptions/prescriptions_home_page.dart b/lib/pages/medical/prescriptions/prescriptions_home_page.dart index 96d4aba0..380d6284 100644 --- a/lib/pages/medical/prescriptions/prescriptions_home_page.dart +++ b/lib/pages/medical/prescriptions/prescriptions_home_page.dart @@ -71,12 +71,12 @@ class _HomePrescriptionsPageState extends State child: Container( height: 60.0, margin: EdgeInsets.only(top: 10.0), - width: MediaQuery.of(context).size.width * 0.9, + width: MediaQuery.of(context).size.width * 0.92, decoration: BoxDecoration( border: Border( bottom: BorderSide( color: Theme.of(context).dividerColor, - width: 0.7), + width: 0.9), //width: 0.7 ), color: Colors.white), child: Center( @@ -84,10 +84,10 @@ class _HomePrescriptionsPageState extends State isScrollable: true, controller: _tabController, indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, labelColor: Theme.of(context).primaryColor, labelPadding: - EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), + EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), unselectedLabelColor: Colors.grey[800], tabs: [ Container( diff --git a/lib/pages/medical/reports/report_home_page.dart b/lib/pages/medical/reports/report_home_page.dart index d3c818ff..42dcf40a 100644 --- a/lib/pages/medical/reports/report_home_page.dart +++ b/lib/pages/medical/reports/report_home_page.dart @@ -101,7 +101,7 @@ class _HomeReportPageState extends State isScrollable: true, controller: _tabController, indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, labelColor: Theme.of(context).primaryColor, unselectedLabelColor: Colors.grey[800], tabs: [ diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 63cf8a44..736e7e14 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -1243,6 +1243,8 @@ class TranslationBase { localizedValues['termOfService'][locale.languageCode]; String get shoppingCart => localizedValues['shoppingCart'][locale.languageCode]; + String get covidTest => localizedValues['covidTest'][locale.languageCode]; + String get driveThru => localizedValues['driveThru'][locale.languageCode]; } diff --git a/lib/widgets/data_display/medical/medical_profile_item.dart b/lib/widgets/data_display/medical/medical_profile_item.dart index 7fd97f52..1751e0e5 100644 --- a/lib/widgets/data_display/medical/medical_profile_item.dart +++ b/lib/widgets/data_display/medical/medical_profile_item.dart @@ -26,7 +26,6 @@ class MedicalProfileItem extends StatelessWidget { showBorder: true, borderWidth: 0, margin: 4, - height: 120, child: Container( padding: EdgeInsets.all(10), child: Column(