From a7a06f40835a2738981099d6a7608283026ea7e8 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 24 May 2023 16:55:53 +0300 Subject: [PATCH] Home page change --- lib/config/config.dart | 4 +- lib/config/localized_values.dart | 1 + .../fragments/home_page_fragment2.dart | 124 ++++++------------ lib/uitl/translations_delegate_base.dart | 1 + 4 files changed, 43 insertions(+), 87 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 0694f080..b84ee11e 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,8 +20,8 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:2018/'; - // var BASE_URL = 'https://uat.hmgwebservices.com/'; -var BASE_URL = 'https://hmgwebservices.com/'; + var BASE_URL = 'https://uat.hmgwebservices.com/'; +// var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 5fe40ec1..9737f921 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1883,4 +1883,5 @@ const Map localizedValues = { "pharmaLiveCareMakePayment1": {"en": "Make the payment through the mobile app", "ar": "قم بالدفع من خلال تطبيق الهاتف المحمول"}, "pharmaLiveCareJoinConsultation": {"en": "Join the virtual consultation from booth", "ar": "انضم إلى الاستشارة الافتراضية من الكبينة"}, "pharmaLiveCareJoinConsultation1": {"en": "Wait for the doctor in the pharma booth to join you", "ar": "انتظر حتى ينضم إليك الطبيب في كبينة لايف كير الصيدلية"}, + "emergencyServicesSubtitle": {"en": "Always at your service", "ar": "في خدمتكم دائما"}, }; \ No newline at end of file diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index 9111c2ab..bb7a4156 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -1,6 +1,3 @@ -import 'dart:math' as math; - -import 'package:auto_size_text/auto_size_text.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; @@ -12,6 +9,7 @@ import 'package:diplomaticquarterapp/models/gradient_color.dart'; import 'package:diplomaticquarterapp/models/hmg_services.dart'; import 'package:diplomaticquarterapp/models/slider_data.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart'; +import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/logged_slider_view.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/services_view.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/slider_view.dart'; @@ -289,9 +287,8 @@ class _HomePageFragment2State extends State { flex: 1, child: InkWell( onTap: () { - AuthenticatedUser user = projectViewModel.user; - if (projectViewModel.havePrivilege(82) || bypassPrivilageCheck) Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesOfferTabPage(user))); - projectViewModel.analytics.offerPackages.log(); + // Navigator.of(context).push(MaterialPageRoute(builder: (context) => ErOptions(isAppbar: true))); + Navigator.push(context, FadePage(page: ErOptions(isAppbar: true))); }, child: Stack( children: [ @@ -306,7 +303,7 @@ class _HomePageFragment2State extends State { width: double.infinity, height: double.infinity, // color: Color(0xFF2B353E), - decoration: containerRadius(Color(0xFF2B353E), 20), + decoration: containerRadius(CustomColors.accentColor, 20), ), Container( width: double.infinity, @@ -331,9 +328,9 @@ class _HomePageFragment2State extends State { left: 20, top: 12, child: Opacity( - opacity: 0.04, + opacity: 0.5, child: SvgPicture.asset( - "assets/images/new/logo.svg", + "assets/images/new/emergency_services_back.svg", height: MediaQuery.of(context).size.width * 0.14, ), ), @@ -342,96 +339,55 @@ class _HomePageFragment2State extends State { right: 20, top: 12, child: Opacity( - opacity: 0.04, + opacity: 0.5, child: SvgPicture.asset( - "assets/images/new/logo.svg", + "assets/images/new/emergency_services_back.svg", height: MediaQuery.of(context).size.width * 0.14, ), ), ), - projectViewModel.isArabic - ? Positioned( - right: -16, - top: 2, - child: Transform.rotate( - angle: math.pi / 4, - child: Container( - padding: EdgeInsets.only(left: 18, right: 18, top: 6, bottom: 3), - color: CustomColors.accentColor, - child: Text( - TranslationBase.of(context).newDes, - style: TextStyle( - color: Colors.white, - fontSize: 9, - height: 0.8, - letterSpacing: -0.27, - ), - ), - ), - ), - ) - : Positioned( - left: -16, - top: 2, - child: Transform.rotate( - angle: -math.pi / 4, - child: Container( - padding: EdgeInsets.only(left: 18, right: 18, top: 6, bottom: 3), - color: CustomColors.accentColor, - child: Text( - TranslationBase.of(context).newDes, - style: TextStyle( - color: Colors.white, - fontSize: 9, - letterSpacing: -0.27, - height: 1.2, - ), - ), - ), - ), - ), Container( width: double.infinity, height: double.infinity, - padding: EdgeInsets.only(left: projectViewModel.isArabic ? 20 : 25, right: projectViewModel.isArabic ? 25 : 20), + padding: EdgeInsets.all(SizeConfig.widthMultiplier * 3.4), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, children: [ - mFlex(3), - AutoSizeText( - TranslationBase.of(context).offersdiscount, - maxLines: 1, - style: TextStyle( - color: Colors.black, - fontSize: 14, - fontWeight: FontWeight.bold, - letterSpacing: -0.75, - height: 1, - ), - ), - projectViewModel.isArabic ? mHeight(4) : Container(), - Text( - TranslationBase.of(context).explore, - style: TextStyle( - color: Colors.black, - fontSize: 9, - fontWeight: FontWeight.w600, - letterSpacing: -0.27, - height: projectViewModel.isArabic ? 0.8 : 1, + Container( + child: SvgPicture.asset( + "assets/images/new/emergency_services.svg", + height: MediaQuery.of(context).size.width * 0.08, ), ), mFlex(1), - Row( + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, children: [ - showFloating("assets/images/new/ear.svg"), - mWidth(4), - showFloating("assets/images/new/head.svg"), - mWidth(4), - showFloating("assets/images/new/tooth.svg"), + Text( + TranslationBase.of(context).emergencyServices, + style: TextStyle( + color: Colors.black, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.45, + height: 1, + ), + ), + projectViewModel.isArabic ? mHeight(5) : Container(), + Text( + TranslationBase.of(context).emergencyServicesSubtitle, + style: TextStyle( + color: Colors.black, + fontSize: 9, + fontWeight: FontWeight.w600, + letterSpacing: -0.27, + height: projectViewModel.isArabic ? 0.2 : 1, + ), + ), ], ), - mFlex(2) ], ), ), @@ -500,7 +456,7 @@ class _HomePageFragment2State extends State { left: 20, top: 12, child: Opacity( - opacity: 0.04, + opacity: 0.25, child: SvgPicture.asset( "assets/images/new/Pharmacy.svg", height: MediaQuery.of(context).size.width * 0.15, @@ -511,7 +467,7 @@ class _HomePageFragment2State extends State { right: 20, top: 12, child: Opacity( - opacity: 0.04, + opacity: 0.25, child: SvgPicture.asset( "assets/images/new/Pharmacy.svg", height: MediaQuery.of(context).size.width * 0.15, @@ -527,8 +483,6 @@ class _HomePageFragment2State extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Container( - color: Colors.yellow, - // width: MediaQuery.of(context).size.width * 0.065, child: SvgPicture.asset( "assets/images/new/Pharmacy.svg", height: MediaQuery.of(context).size.width * 0.08, diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index dabe80ab..bdaa3798 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2891,6 +2891,7 @@ class TranslationBase { String get pharmaLiveCareMakePayment1 => localizedValues["pharmaLiveCareMakePayment1"][locale.languageCode]; String get pharmaLiveCareJoinConsultation => localizedValues["pharmaLiveCareJoinConsultation"][locale.languageCode]; String get pharmaLiveCareJoinConsultation1 => localizedValues["pharmaLiveCareJoinConsultation1"][locale.languageCode]; + String get emergencyServicesSubtitle => localizedValues["emergencyServicesSubtitle"][locale.languageCode]; }