diff --git a/assets/images/Weather_ico.png b/assets/images/Weather_ico.png new file mode 100644 index 00000000..2e00ae8c Binary files /dev/null and b/assets/images/Weather_ico.png differ diff --git a/assets/images/Weather_img.png b/assets/images/Weather_img.png new file mode 100644 index 00000000..57901477 Binary files /dev/null and b/assets/images/Weather_img.png differ diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 98c81737..d3edb53c 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -355,7 +355,7 @@ const Map localizedValues = { "EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'}, "OnlinePaymentService": { "en": "Online Payment Service", - 'ar': 'خدمة الدفع عبر الإلكتدوني' + 'ar': 'خدمة الدفع الإلكتدوني' }, "OffersAndPackages": { "en": "Online transfer request", @@ -825,5 +825,12 @@ const Map localizedValues = { }, "orderStatus": {"en": "Order Status", "ar": "حالة الطلب"}, "CancelOrder": {"en": "Cancel Order", "ar": "الغاء الطلب"}, - + "FindUs": {"en": "Find Us", "ar": "اين تجدنا"}, + "Feedback": {"en": "Feedback", "ar": "رأيك يهمنا"}, + "LiveChat": {"en": "Live Chat", "ar": "محادثة مباشرة"}, + "Service": {"en": "Service", "ar": "خدمة"}, + "HMGServiceLabel": {"en": "HMG Service", 'ar': 'خدمات الحبيب'}, + "HealthWeatherIndicators": {"en": "Health Weather Indicators", 'ar': ' مؤشرات الطقس الصحية '}, + "HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية على أساس الطقس الحالي '}, + "MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "}, }; diff --git a/lib/core/viewModels/medical/medical_view_model.dart b/lib/core/viewModels/medical/medical_view_model.dart index 8621546b..52fd221a 100644 --- a/lib/core/viewModels/medical/medical_view_model.dart +++ b/lib/core/viewModels/medical/medical_view_model.dart @@ -12,10 +12,8 @@ class MedicalViewModel extends BaseViewModel { _medicalService.appoitmentAllHistoryResultList; getAppointmentHistory() async { - var asd =""; if (authenticatedUserObject.isLogin) { setState(ViewState.Busy); - // if (_medicalService.appoitmentAllHistoryResultList.length == 0) await _medicalService.getAppointmentHistory(); if (_medicalService.hasError) { error = _medicalService.error; diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index a5fcfd27..7e3d4181 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -23,6 +23,7 @@ import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/services)contaniner.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; @@ -33,7 +34,7 @@ class AllHabibMedicalService extends StatefulWidget { //TODO final Function goToMyProfile; - AllHabibMedicalService({Key key, this.goToMyProfile}); + AllHabibMedicalService({Key key, this.goToMyProfile}); @override _AllHabibMedicalServiceState createState() => _AllHabibMedicalServiceState(); @@ -66,38 +67,51 @@ class _AllHabibMedicalServiceState extends State { shrinkWrap: true, children: [ Container( + margin: EdgeInsets.all(8), width: double.infinity, - height: 190, + height: 150, decoration: BoxDecoration( - image: DecorationImage( - image: ExactAssetImage('assets/images/timeline_bg.png'), - fit: BoxFit.cover, - ), - ), + image: DecorationImage( + image: ExactAssetImage('assets/images/Weather_img.png'), + fit: BoxFit.cover, + ), + borderRadius: BorderRadius.circular(8.0)), child: Padding( padding: EdgeInsets.symmetric(horizontal: 10.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'Health Weather Indicators', - style: TextStyle( + child: Row( + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context) + .healthWeatherIndicators, color: Colors.white, - fontSize: 22.0, fontWeight: FontWeight.w600, ), - ), - SizedBox( - height: 35.0, - ), - Text( - 'Health Tips Based On Current Weather', - style: TextStyle( + Texts( + TranslationBase.of(context).healthTipsBasedOnCurrentWeather, color: Colors.white, + fontSize: 14, ), + ], + ), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Image.asset('assets/images/Weather_ico.png',width: 80,height: 80,), + Texts( + TranslationBase.of(context).moreDetails, + color: Colors.white, + decoration: TextDecoration.underline, + ), + ], ), - ]), + ) + ], + ), ), ), ServicesContainer( @@ -109,16 +123,7 @@ class _AllHabibMedicalServiceState extends State { 'assets/images/new-design/my_file_bottom_bar.png', title: TranslationBase.of(context).myMedicalFile, ), - ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage( - page: LiveCareHome(), - ), - ), - imageLocation: 'assets/images/new-design/liveCare_ar_bg.png', - title: TranslationBase.of(context).livecare, - ), + ServicesContainer( onTap: () => Navigator.push( context, @@ -143,15 +148,7 @@ class _AllHabibMedicalServiceState extends State { 'assets/images/al-habib_online_payment_service_icon.png', title: TranslationBase.of(context).onlinePaymentService, ), - ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage(), - ), - imageLocation: - 'assets/images/al-habib_online_payment_service_icon.png', - title: 'Covid-19- Drive-Thru Test', - ), + ServicesContainer( onTap: () { Navigator.push( @@ -166,37 +163,7 @@ class _AllHabibMedicalServiceState extends State { imageLocation: 'assets/images/emergency_service_image.png', title: TranslationBase.of(context).emergencyService, ), - ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage( - page: ParkingPage(), - ), - ), - imageLocation: 'assets/images/pharmacy_logo.png', - title: 'Pharmacy'), - ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage( - page: InsuranceUpdate(), - ), - ), - imageLocation: - 'assets/images/medical/insurance_card_icon.png', - title: TranslationBase.of(context).updateInsurance, - ), - ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage( - page: authUser.patientID == null - ? EReferralIndexPage() - : EReferralPage()), - ), - imageLocation: 'assets/images/ereferral_service_icon.png', - title: 'E-Referral', - ), + ServicesContainer( onTap: () => Navigator.push( context, @@ -208,15 +175,7 @@ class _AllHabibMedicalServiceState extends State { 'assets/images/new-design/family_menu_icon_red.png', title: 'My Family', ), - ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage(page: ChildVaccinesPage()), - ), - imageLocation: - 'assets/images/new-design/children_vaccines_icon.png', - title: 'Child Vaccines', - ), + ServicesContainer( onTap: () => Navigator.push( context, @@ -228,61 +187,7 @@ class _AllHabibMedicalServiceState extends State { 'assets/images/new-design/upcoming_icon_bottom_bar.png', title: TranslationBase.of(context).todoList, ), - ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage(page: SymptomInfo()), - ), - imageLocation: 'assets/images/new-design/body_icon.png', - title: 'Symptom Checker'), - ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage(page: BloodDonationPage()), - ), - imageLocation: 'assets/images/new-design/blood_icon.png', - title: 'Blood Donation', - ), - ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage( - page: (HealthCalculators()), - ), - ), - imageLocation: - 'assets/images/new-design/health_calculator_icon.png', - title: 'Health Calculators', - ), - ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage( - page: HealthConverter(), - ), - ), - imageLocation: - 'assets/images/new-design/health_convertor_icon.png', - title: 'Health Converter', - ), - ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage( - page: H2OPageIndexPage(), - ), - ), - imageLocation: 'assets/images/new-design/water_icon.png', - title: 'H2O', - ), - ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage(), - ), - imageLocation: 'assets/images/new-design/smartwatch_icon.png', - title: TranslationBase.of(context).smartWatches, - ), + ServicesContainer( onTap: () => Navigator.push( context, diff --git a/lib/pages/ContactUs/contact_us_page.dart b/lib/pages/ContactUs/contact_us_page.dart index 7d2192f9..d301df3e 100644 --- a/lib/pages/ContactUs/contact_us_page.dart +++ b/lib/pages/ContactUs/contact_us_page.dart @@ -27,8 +27,8 @@ class _ContactUsPageState extends State { @override Widget build(BuildContext context) { return AppScaffold( - isShowAppBar: true,//widget.isAppbar, - appBarTitle: "HMG Services",//TranslationBase.of(context).bookAppo, + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).hMGServiceLabel, isShowDecPage: false, body: Container( margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), @@ -43,7 +43,7 @@ class _ContactUsPageState extends State { Expanded( child: CardCommonContact( image: 'assets/images/new-design/find_us_icon.png', - text: "Find us", + text: TranslationBase.of(context).findUs, subText: "", type: 0, @@ -52,7 +52,7 @@ class _ContactUsPageState extends State { Expanded( child: CardCommonContact( image: 'assets/images/new-design/feedback_icon.png', - text: "Feedback", + text: TranslationBase.of(context).feedback, subText: "", type: 1), @@ -66,21 +66,14 @@ class _ContactUsPageState extends State { Expanded( child: CardCommonContact( image: 'assets/images/new-design/live_chat_icon.png', - text: "Live Chat", - subText: "Service", + text: TranslationBase.of(context).liveChat, + subText: TranslationBase.of(context).service, type: 2, ), ), Expanded( - child: Opacity( - opacity: 0, - child: CardCommonContact( - image: 'assets/images/new-design/feedback_icon.png', - text: "Feedback", - subText: "", - type: 3), - ), + child: Container(), ), ], diff --git a/lib/pages/ContactUs/findus/findus_page.dart b/lib/pages/ContactUs/findus/findus_page.dart index 9b39de3a..807ac1c7 100644 --- a/lib/pages/ContactUs/findus/findus_page.dart +++ b/lib/pages/ContactUs/findus/findus_page.dart @@ -34,9 +34,11 @@ class _FindUsPageState extends State @override Widget build(BuildContext context) { return BaseView( + allowAny: true, onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(), builder: (_, model, w) => AppScaffold( isShowAppBar: true, + isShowDecPage: false, appBarTitle: 'Locations', baseViewModel: model, body: Scaffold( diff --git a/lib/pages/ContactUs/findus/hospitrals_page.dart b/lib/pages/ContactUs/findus/hospitrals_page.dart index d8d898e3..7aa968a5 100644 --- a/lib/pages/ContactUs/findus/hospitrals_page.dart +++ b/lib/pages/ContactUs/findus/hospitrals_page.dart @@ -23,6 +23,7 @@ class _HospitalsPageState extends State { @override Widget build(BuildContext context) { return AppScaffold( + isShowDecPage: false, body: SingleChildScrollView( child: Container( // margin: EdgeInsets.only(left: 15,right: 15,top: 70), diff --git a/lib/pages/ContactUs/findus/pharmacies_page.dart b/lib/pages/ContactUs/findus/pharmacies_page.dart index 663bd3ec..cab201e3 100644 --- a/lib/pages/ContactUs/findus/pharmacies_page.dart +++ b/lib/pages/ContactUs/findus/pharmacies_page.dart @@ -23,6 +23,7 @@ class _PharmaciesPageState extends State { @override Widget build(BuildContext context) { return AppScaffold( + isShowDecPage: false, body: SingleChildScrollView( child: Container( margin: EdgeInsets.only(left: 15, right: 15, top: 70), diff --git a/lib/pages/ContactUs/widgets/card_common_contat.dart b/lib/pages/ContactUs/widgets/card_common_contat.dart index 9ad74aff..67580dbf 100644 --- a/lib/pages/ContactUs/widgets/card_common_contat.dart +++ b/lib/pages/ContactUs/widgets/card_common_contat.dart @@ -1,8 +1,10 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/livechat_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class CardCommonContact extends StatelessWidget { final image; @@ -17,6 +19,7 @@ class CardCommonContact extends StatelessWidget { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return GestureDetector( onTap: () { navigateToSearch(context, this.type); @@ -45,10 +48,12 @@ class CardCommonContact extends StatelessWidget { style: TextStyle( color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)), ), - Container( - alignment: Alignment.bottomRight, - margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0), - child: Image.asset(this.image, width: 60.0, height: 60.0), + Align( + alignment: projectViewModel.isArabic? Alignment.bottomLeft:Alignment.bottomRight, + child: Container( + margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 8.0), + child: Image.asset(this.image, width: 60.0, height: 60.0), + ), ), ], ), diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart index a7d7ba42..be50efb7 100644 --- a/lib/pages/MyAppointments/MyAppointments.dart +++ b/lib/pages/MyAppointments/MyAppointments.dart @@ -44,7 +44,7 @@ class _MyAppointmentsState extends State void initState() { _tabController = new TabController(length: 3, vsync: this); WidgetsBinding.instance.addPostFrameCallback((_) { - if (authenticatedUserObject.isLogin) getPatientAppointmentHistory(); + if (Provider.of(context, listen: false).isLogin) getPatientAppointmentHistory(); }); super.initState(); } diff --git a/lib/pages/base/base_view.dart b/lib/pages/base/base_view.dart index 4c606fe2..5977e97e 100644 --- a/lib/pages/base/base_view.dart +++ b/lib/pages/base/base_view.dart @@ -13,10 +13,12 @@ AppSharedPreferences sharedPref = AppSharedPreferences(); class BaseView extends StatefulWidget { final Widget Function(BuildContext context, T model, Widget child) builder; final Function(T) onModelReady; + final bool allowAny; BaseView({ this.builder, this.onModelReady, + this.allowAny = false, }); @override @@ -31,9 +33,10 @@ class _BaseViewState extends State> { @override void initState() { - //TODO fix it - //Provider.of(context, listen: false).isLogin; - if (widget.onModelReady != null && Provider.of(context, listen: false).isLogin) { + if(widget.allowAny && widget.onModelReady != null){ + widget.onModelReady(model); + } + else if (widget.onModelReady != null && Provider.of(context, listen: false).isLogin) { widget.onModelReady(model); } super.initState(); diff --git a/lib/pages/feedback/feedback_home_page.dart b/lib/pages/feedback/feedback_home_page.dart index d7c7361f..5c7ba86d 100644 --- a/lib/pages/feedback/feedback_home_page.dart +++ b/lib/pages/feedback/feedback_home_page.dart @@ -34,6 +34,7 @@ class _FeedbackHomePageState extends State return AppScaffold( isShowAppBar: true, isBottomBar: false, + isShowDecPage: false, appBarTitle: 'Feedback', body: Scaffold( extendBodyBehindAppBar: true, diff --git a/lib/pages/feedback/send_feedback_page.dart b/lib/pages/feedback/send_feedback_page.dart index c5ec9757..756a421b 100644 --- a/lib/pages/feedback/send_feedback_page.dart +++ b/lib/pages/feedback/send_feedback_page.dart @@ -34,8 +34,10 @@ class _SendFeedbackPageState extends State { @override Widget build(BuildContext context) { return BaseView( + allowAny: true, builder: (_, model, widget) => AppScaffold( baseViewModel: model, + isShowDecPage: false, body: Container( height: MediaQuery.of(context).size.height * 0.8, child: SingleChildScrollView( diff --git a/lib/pages/feedback/status_feedback_page.dart b/lib/pages/feedback/status_feedback_page.dart index 01a2b4c9..b6e389cf 100644 --- a/lib/pages/feedback/status_feedback_page.dart +++ b/lib/pages/feedback/status_feedback_page.dart @@ -17,9 +17,11 @@ class _StatusFeedbackPageState extends State { @override Widget build(BuildContext context) { return BaseView( + allowAny: true, onModelReady: (model) => model.getCOC(), builder: (_, model, widget) => AppScaffold( baseViewModel: model, + isShowDecPage: false, body: Container( margin: EdgeInsets.only(top: 8.0,left: 8.0,right: 8.0 ), padding: EdgeInsets.all(15.0), diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index abb5c06a..6716535b 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -170,7 +170,7 @@ class _HomePageState extends State { color: Colors.transparent, width: 0.5), borderRadius: BorderRadius.all( - Radius.circular(9)), + Radius.circular(4)), ), child: Center( child: Texts( @@ -178,7 +178,8 @@ class _HomePageState extends State { .viewMore, color: Theme.of(context) .primaryColor, - fontSize: 12, + fontSize: 14, + ), ), ), @@ -685,7 +686,7 @@ class _HomePageState extends State { child: Container(), ), Texts( - TranslationBase.of(context).viewMore, + TranslationBase.of(context).viewAll, color: Colors.white, bold: true, ) @@ -726,7 +727,7 @@ class _HomePageState extends State { child: Container(), ), Texts( - TranslationBase.of(context).viewMore, + TranslationBase.of(context).viewAll, color: Colors.white, bold: true, ) diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 609f6b2c..8caba808 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -27,8 +27,10 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; import '../../locator.dart'; +import '../../routes.dart'; import 'home_page.dart'; class LandingPage extends StatefulWidget { @@ -330,10 +332,8 @@ class _LandingPageState extends State with WidgetsBindingObserver { @override Widget build(BuildContext context) { - //final searchValue = Provider.of(context); - //print(searchValue); - // projectProvider = Provider.of(context); - // checkValue(projectProvider); + ProjectViewModel projectViewModel = Provider.of(context); + return Scaffold( appBar: AppBar( elevation: 0, @@ -341,10 +341,11 @@ class _LandingPageState extends State with WidgetsBindingObserver { headline6: TextStyle(color: Colors.white, fontWeight: FontWeight.bold), ), - title: Texts( + title: Text( getText(currentTab).toUpperCase(), - bold: true, - color: Colors.white, + style: TextStyle(fontWeight: FontWeight.bold,color: Colors.white,fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'), + // bold: true, + // color: Colors.white, ), leading: Builder( builder: (BuildContext context) { @@ -356,14 +357,20 @@ class _LandingPageState extends State with WidgetsBindingObserver { }, ), actions: [ - // IconButton( - // iconSize: 70, - // icon: SvgPicture.asset('assets/images/svg/robort_svg.svg', - // height: 100, width: 100, fit: BoxFit.cover), - // onPressed: () { - // triggerRobot(); - // } //do something, - // ) + IconButton( + //iconSize: 70, + icon: Icon(projectViewModel.isLogin?Icons.settings : Icons.login,color: Colors.white,), + onPressed: () { + if(projectViewModel.isLogin) + Navigator.of(context).pushNamed( + SETTINGS , + ); + else + Navigator.of(context).pushNamed( + WELCOME_LOGIN , + ); + }, //do something, + ) ], centerTitle: true, ), diff --git a/lib/pages/medical/medical_profile_page.dart b/lib/pages/medical/medical_profile_page.dart index 30aafff8..41746f3c 100644 --- a/lib/pages/medical/medical_profile_page.dart +++ b/lib/pages/medical/medical_profile_page.dart @@ -156,8 +156,7 @@ class _MedicalProfilePageState extends State { child: MedicalProfileItem( title: TranslationBase.of(context).lab, imagePath: 'lab_result_icon.png', - subTitle: - TranslationBase.of(context).lab, + subTitle: TranslationBase.of(context).labSubtitle, ), ), ), diff --git a/lib/pages/paymentService/payment_service.dart b/lib/pages/paymentService/payment_service.dart index 0d19045b..c31981f7 100644 --- a/lib/pages/paymentService/payment_service.dart +++ b/lib/pages/paymentService/payment_service.dart @@ -16,6 +16,7 @@ class PaymentService extends StatelessWidget { ProjectViewModel projectViewModel = Provider.of(context); return AppScaffold( isShowAppBar: true, + isShowDecPage: false, appBarTitle: TranslationBase.of(context).paymentService, body: SingleChildScrollView( child: Container( diff --git a/lib/pages/pharmacies/medicine_search_screen.dart b/lib/pages/pharmacies/medicine_search_screen.dart index 7d8509ee..df7b19fc 100644 --- a/lib/pages/pharmacies/medicine_search_screen.dart +++ b/lib/pages/pharmacies/medicine_search_screen.dart @@ -26,6 +26,7 @@ class MedicineSearch extends StatelessWidget { baseViewModel: model, appBarTitle: TranslationBase.of(context).searchMedicine, isShowAppBar: true, + isShowDecPage: false, body: Container( height: SizeConfig.screenHeight, child: Column( diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 12704424..05a0a248 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -779,6 +779,15 @@ class TranslationBase { String get orderStatus => localizedValues['orderStatus'][locale.languageCode]; String get cancelOrder => localizedValues['CancelOrder'][locale.languageCode]; + String get findUs => localizedValues['FindUs'][locale.languageCode]; + String get feedback => localizedValues['Feedback'][locale.languageCode]; + String get liveChat => localizedValues['LiveChat'][locale.languageCode]; + String get service => localizedValues['Service'][locale.languageCode]; + String get hMGServiceLabel => localizedValues['HMGServiceLabel'][locale.languageCode]; + String get healthWeatherIndicators => localizedValues['HealthWeatherIndicators'][locale.languageCode]; + String get healthTipsBasedOnCurrentWeather => localizedValues['HealthTipsBasedOnCurrentWeather'][locale.languageCode]; + String get moreDetails => localizedValues['MoreDetails'][locale.languageCode]; + } diff --git a/lib/widgets/bottom_navigation/bottom_navigation_item.dart b/lib/widgets/bottom_navigation/bottom_navigation_item.dart index b1c565f6..ba35f3c6 100644 --- a/lib/widgets/bottom_navigation/bottom_navigation_item.dart +++ b/lib/widgets/bottom_navigation/bottom_navigation_item.dart @@ -54,16 +54,19 @@ class BottomNavigationItem extends StatelessWidget { size: 22.0), ), SizedBox( - height: 5, + height: 2, ), Texts( name, textAlign: TextAlign.center, color: currentIndex == index ? Theme.of(context).primaryColor - : Theme.of(context).dividerColor, + : Colors.grey, fontSize: 11, ), + SizedBox( + height: 7, + ), ], ) : authenticatedUserObject.isLogin @@ -103,16 +106,19 @@ class BottomNavigationItem extends StatelessWidget { size: 22.0), ), SizedBox( - height: 5, + height: 2, ), Texts( name, textAlign: TextAlign.center, color: currentIndex == index ? Theme.of(context).primaryColor - : Theme.of(context).dividerColor, + : Colors.grey, fontSize: 11, ), + SizedBox( + height: 7, + ), ], ), ], @@ -133,16 +139,19 @@ class BottomNavigationItem extends StatelessWidget { size: 22.0), ), SizedBox( - height: 5, + height: 2, ), Texts( name, textAlign: TextAlign.center, color: currentIndex == index ? Theme.of(context).primaryColor - : Theme.of(context).dividerColor, + : Colors.grey, fontSize: 11, ), + SizedBox( + height: 7, + ), ], ), ), diff --git a/lib/widgets/buttons/secondary_button.dart b/lib/widgets/buttons/secondary_button.dart index af0ccc8f..b1ae9048 100644 --- a/lib/widgets/buttons/secondary_button.dart +++ b/lib/widgets/buttons/secondary_button.dart @@ -1,5 +1,7 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; +import 'package:provider/provider.dart'; /// SecondaryButton widget /// [label] button label @@ -127,6 +129,7 @@ class _SecondaryButtonState extends State @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return IgnorePointer( ignoring: widget.loading, child: GestureDetector( @@ -232,7 +235,7 @@ class _SecondaryButtonState extends State color: widget.textColor, fontSize: 17.0, fontWeight: FontWeight.w800, - fontFamily: "WorkSans"), + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'), ), ) ], diff --git a/lib/widgets/data_display/medical/medical_profile_item.dart b/lib/widgets/data_display/medical/medical_profile_item.dart index a0076f7d..6aadb3e0 100644 --- a/lib/widgets/data_display/medical/medical_profile_item.dart +++ b/lib/widgets/data_display/medical/medical_profile_item.dart @@ -1,6 +1,8 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; import '../text.dart'; @@ -18,6 +20,7 @@ class MedicalProfileItem extends StatelessWidget { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return RoundedContainer( showBorder: true, borderWidth: 0, @@ -39,7 +42,7 @@ class MedicalProfileItem extends StatelessWidget { fontWeight: FontWeight.bold), Texts(subTitle,fontSize: 1.4 * SizeConfig.textMultiplier,), Align( - alignment: Alignment.bottomRight, + alignment:projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight, child: Image.asset( "assets/images/medical/$imagePath", height: SizeConfig.heightMultiplier * 5, diff --git a/lib/widgets/data_display/medical/time_line_widget.dart b/lib/widgets/data_display/medical/time_line_widget.dart index ebac57d2..ddb3175a 100644 --- a/lib/widgets/data_display/medical/time_line_widget.dart +++ b/lib/widgets/data_display/medical/time_line_widget.dart @@ -80,11 +80,15 @@ class TimeLineWidget extends StatelessWidget { height: 4, ), Texts( - DateUtil.getMonthDayYearDateFormatted( - DateUtil.convertStringToDate( - appoitmentAllHistoryResul.appointmentDate)), + DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appoitmentAllHistoryResul.appointmentDate)), color: Colors.white, - fontSize: 10.5, + fontSize: 12.5, + fontWeight: FontWeight.normal, + ), + Texts( + appoitmentAllHistoryResul.clinicName, + color: Colors.white, + fontSize: 12.5, fontWeight: FontWeight.normal, ) ], @@ -93,17 +97,23 @@ class TimeLineWidget extends StatelessWidget { ) else Positioned( - top:projectViewModel.isArabic ? 63 : 70, + top:projectViewModel.isArabic ? 35 : 50, child: Container( margin: EdgeInsets.only(left: 2, right: 2), child: Column( children: [ + Texts( + appoitmentAllHistoryResul.clinicName, + color: Colors.white, + fontSize: 12.5, + fontWeight: FontWeight.normal, + ), Texts( DateUtil.getMonthDayYearDateFormatted( DateUtil.convertStringToDate( appoitmentAllHistoryResul.appointmentDate)), color: Colors.white, - fontSize: 10.5, + fontSize: 12.5, fontWeight: FontWeight.normal, ), SizedBox( diff --git a/lib/widgets/data_display/text.dart b/lib/widgets/data_display/text.dart index 215db9ff..49f31354 100644 --- a/lib/widgets/data_display/text.dart +++ b/lib/widgets/data_display/text.dart @@ -1,4 +1,6 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class Texts extends StatefulWidget { final String text; @@ -164,6 +166,7 @@ class _TextsState extends State { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); TextStyle _getFontStyle() { switch (widget.style) { case "headline2": @@ -262,10 +265,7 @@ class _TextsState extends State { style: _getFontStyle().copyWith( color: Theme.of(context).primaryColor, fontWeight: FontWeight.w800, - fontFamily: - Localizations.localeOf(context).languageCode == 'ar' - ? 'Cairo' - : 'WorkSans', + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans', ), ), ),