From 3832cee1ad07865c51bb511ae0291aa0035153d3 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 4 Feb 2021 09:39:01 +0300 Subject: [PATCH] Translation fixes --- lib/config/localized_values.dart | 92 +++++++++++++++++++ .../Covid-DriveThru/Covid-TimeSlots.dart | 10 +- .../covid-drivethru-location.dart | 48 ++++++---- .../covid-payment-details.dart | 16 ++-- lib/pages/livecare/livecare_home.dart | 66 ++++++------- .../schedule_clinic_card.dart | 2 +- lib/pages/livecare/livecare_type_select.dart | 32 +++---- lib/pages/livecare/widgets/clinic_list.dart | 5 +- lib/uitl/translations_delegate_base.dart | 27 ++++++ 9 files changed, 213 insertions(+), 85 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 5658469e..79f4930c 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1650,4 +1650,96 @@ const Map localizedValues = { "en": "Comprehensive Medical Checkup", "ar": "فحص طبي شامل" }, + "select-location": { + "en": "Select Location", + "ar": "اختر موقعا" + }, + "result-header": { + "en": "Get The Result During 8 Hours", + "ar": "احصل على النتيجة خلال 8 ساعة" + }, + "covid-info": { + "en": "We are using the advance technology to test COVID-19, The sample for examination is taking between the nose and mouth (nasopharyngeal swab), the examination is done by ELITE In Genius of the company ELITECH GROUP MOLECULAR DIAGNOSTICS, Note that the device belongs to an Italian company and is manufactured in Japan with RC- PCR​", + "ar": "يتوفر لدينا أحدث جهاز خاص بفحص مرض الكورونا (COVID-19) طريقة الفحص تؤخذ مسحة من البلعوم الأنفي ( عن طريف الأنف) ويتم الفحص بواسطة جهاز ELITE In Genius التابع لشركة ELITECH GROUP MOLECULAR DIAGNOSTICS علما بأن الجهاز تابع لشركة إيطالية ومصنع في اليابان بتقينة RC-PCR" + }, + "select-appo": { + "en": "Kindly select one of the available appointments from below:", + "ar": "يرجى اختيار أحد المواعيد المتاحة من أدناه:" + }, + "covid-alert-header": { + "en": "Pay With-in 15 mins to confirm the appointment", + "ar": "الرجاء اتمام عملية الدفع خلال 15 دقيقه لتاكيد الموعد" + }, + "covid-alert-info": { + "en": "Payment for Covid-19 Test should Be made with-in 15 mins otherwise The system will Cancel the Scheduled appointment automatically​", + "ar": "سيتم الغاء الموعد عن طريق النظام بشكل الي في حال عدم اتمام عمليه الدفع خلال 15 دقيقة​" + }, + "covid-alert-mins": { + "en": "Pay With-in 15 mins", + "ar": "ادفع خلال 15 دقيقة" + }, + "back": { + "en": "Back", + "ar": "رجوع" + }, + "get-directions": { + "en": "Get Directions", + "ar": "احصل على الاتجاهات" + }, + "selected-location": { + "en": "Selected Location:", + "ar": "الموقع المحدد:" + }, + "test-fee": { + "en": "Test Fee", + "ar": "رسوم الاختبار" + }, + "pay-options": { + "en": "You can pay by the following Options:", + "ar": "يمكنك الدفع عن طريق الخيارات التالية:" + }, + "livecare-service": { + "en": "LiveCare Service", + "ar": "خدمة لايف كير" + }, + "livecare-service-desc": { + "en": "is to obtain medical advice with a specialist doctor Via a video call", + "ar": "هي الحصول على استشارة طبية مع طبيب مختص عن طريق اتصال فيديو" + }, + "why-livecare": { + "en": "WHY LIVECARE", + "ar": "لماذا خدمة اللايف كير" + }, + "livecare-point-1": { + "en": "No need to wait you will get Medical consultation immediately via Video call", + "ar": "لا داعي للانتظار سوف تحصل على الاستشارة الطبية فورا عن طريق مكالمة الفيديو" + }, + "doc-virtual-appo-ins4": { + "en": "The doctor will see your medical file", + "ar": "سوف يتمكن الطبيب من الاطلاع على ملفك الطبي كامل" + }, + "doc-virtual-appo-ins5": { + "en": "Free prescription delivery service", + "ar": "خدمة توصيل الادوية مجانا" + }, + "livecare-summary": { + "en": "** The service is included with some insurance companies according to the terms and conditions With our best wishes for health and wellness", + "ar": "** الخدمة مشمولة لدى بعض شركات التامين على حسب الشروط والاحكام مع تمنياتنا لكم بدوام الصحة والعافية" + }, + "livecare-option-1": { + "en": "Get Medical consultation immediately", + "ar": "الحصول على الاستشارة فورا" + }, + "livecare-option-2": { + "en": "Instant video call", + "ar": "اتصال فيديو فوري" + }, + "livecare-option-3": { + "en": "Book Appointment", + "ar": "حجز موعد" + }, + "livecare-option-4": { + "en": "Schedule video call", + "ar": "اتصال فيديو مجدول" + }, }; diff --git a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart index f21a9718..495e5bb1 100644 --- a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart +++ b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart @@ -113,7 +113,7 @@ class _CovidTimeSlotsState extends State @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: "COVID-19 TEST", + appBarTitle: TranslationBase.of(context).covidTest, isShowAppBar: true, body: SingleChildScrollView( child: Container( @@ -147,8 +147,8 @@ class _CovidTimeSlotsState extends State children: [ Container( margin: EdgeInsets.only( - left: 20.0, right: 20.0, top: 40.0), - child: Text("COVID-19 TEST", + left: 20.0, right: 20.0, top: 20.0), + child: Text(TranslationBase.of(context).covidTest, style: TextStyle( color: Colors.white, fontWeight: FontWeight.bold, @@ -157,7 +157,7 @@ class _CovidTimeSlotsState extends State Container( margin: EdgeInsets.only( left: 20.0, right: 20.0, top: 10.0), - child: Text("Drive-Thru", + child: Text(TranslationBase.of(context).driveThru, style: TextStyle( color: Colors.white, fontSize: 24.0)), ), @@ -180,7 +180,7 @@ class _CovidTimeSlotsState extends State Container( margin: EdgeInsets.all(10.0), child: Text( - "Kindly select one of the available appointments from below: ", + TranslationBase.of(context).selectAppo, style: TextStyle(color: Colors.black, fontSize: 16.0)), ), diff --git a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart index 0563c4bd..449c8bfe 100644 --- a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart +++ b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart @@ -1,12 +1,16 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart'; import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCenterModel.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-details.dart'; import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; import 'package:maps_launcher/maps_launcher.dart'; +import 'package:provider/provider.dart'; import 'package:smart_progress_bar/smart_progress_bar.dart'; class CovidDrivethruLocation extends StatefulWidget { @@ -23,6 +27,8 @@ class _CovidDrivethruLocationState extends State { String projectName = ""; String projectID = ""; + ProjectViewModel projectViewModel; + @override void initState() { WidgetsBinding.instance @@ -32,8 +38,9 @@ class _CovidDrivethruLocationState extends State { @override Widget build(BuildContext context) { + projectViewModel = Provider.of(context); return AppScaffold( - appBarTitle: "COVID-19 TEST", + appBarTitle: TranslationBase.of(context).covidTest, isShowAppBar: true, body: SingleChildScrollView( child: Container( @@ -41,8 +48,10 @@ class _CovidDrivethruLocationState extends State { child: Column( children: [ Container( - alignment: Alignment.centerLeft, - child: Text("Get The Result During 8 Hours", + alignment: projectViewModel.isArabic + ? Alignment.centerRight + : Alignment.centerLeft, + child: Text(TranslationBase.of(context).resultHeader, style: TextStyle( fontWeight: FontWeight.bold, fontSize: 22.0, @@ -50,14 +59,15 @@ class _CovidDrivethruLocationState extends State { ), Container( margin: EdgeInsets.only(top: 10.0), - child: Text( - "We are using the advance technology to test COVID-19, The sample for examination is taking between the nose and mouth (nasopharyngeal swab), the examination is done by ELITE In Genius of the company ELITECH GROUP MOLECULAR DIAGNOSTICS, Note that the device belongs to an Italian company and is manufactured in Japan with RC- PCR​", + child: Text(TranslationBase.of(context).covidInfo, style: TextStyle(fontSize: 16.0, color: Colors.black)), ), Container( margin: EdgeInsets.only(top: 20.0), - alignment: Alignment.centerLeft, - child: Text("Select Location", + alignment: projectViewModel.isArabic + ? Alignment.centerRight + : Alignment.centerLeft, + child: Text(TranslationBase.of(context).selectLocation, style: TextStyle( fontWeight: FontWeight.bold, fontSize: 18.0, @@ -79,7 +89,7 @@ class _CovidDrivethruLocationState extends State { margin: EdgeInsets.only(top: 15.0), child: DropdownButtonHideUnderline( child: DropdownButton( - hint: new Text("Select Address"), + hint: new Text(TranslationBase.of(context).selectAddress), value: projectDropdownValue, items: projectsList.map((item) { return new DropdownMenuItem( @@ -98,8 +108,10 @@ class _CovidDrivethruLocationState extends State { isLocationSelected ? Container( margin: EdgeInsets.only(top: 15.0), - alignment: Alignment.centerLeft, - child: Text("Selected Location", + alignment: projectViewModel.isArabic + ? Alignment.centerRight + : Alignment.centerLeft, + child: Text(TranslationBase.of(context).selectLocation, style: TextStyle( fontWeight: FontWeight.bold, fontSize: 18.0, @@ -150,8 +162,8 @@ class _CovidDrivethruLocationState extends State { onPressed: () { getDirections(); }, - child: - Text("GET DIRECTIONS", style: TextStyle(fontSize: 18.0)), + child: Text(TranslationBase.of(context).getDirections, + style: TextStyle(fontSize: 18.0)), ), ), ), @@ -178,7 +190,8 @@ class _CovidDrivethruLocationState extends State { onPressed: () { back(); }, - child: Text("BACK", style: TextStyle(fontSize: 18.0)), + child: Text(TranslationBase.of(context).back, + style: TextStyle(fontSize: 18.0)), ), ), ), @@ -201,7 +214,8 @@ class _CovidDrivethruLocationState extends State { onPressed: () { next(); }, - child: Text("NEXT", style: TextStyle(fontSize: 18.0)), + child: Text(TranslationBase.of(context).next, + style: TextStyle(fontSize: 18.0)), ), ), ), @@ -287,6 +301,7 @@ class _CovidDrivethruLocationState extends State { getProjectsList(BuildContext context) { CovidDriveThruService service = new CovidDriveThruService(); + GifLoaderDialogUtils.showMyDialog(context); service.getCovidProjectsList(context).then((res) { print(res); if (res['MessageStatus'] == 1) { @@ -296,10 +311,11 @@ class _CovidDrivethruLocationState extends State { projectsList.add(new DriveThroughTestingCenterModel.fromJson(v)); }); }); + GifLoaderDialogUtils.hideDialog(context); } else {} }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } } diff --git a/lib/pages/Covid-DriveThru/covid-payment-details.dart b/lib/pages/Covid-DriveThru/covid-payment-details.dart index 1254997d..07914c9e 100644 --- a/lib/pages/Covid-DriveThru/covid-payment-details.dart +++ b/lib/pages/Covid-DriveThru/covid-payment-details.dart @@ -23,7 +23,7 @@ class _CovidPaymentDetailsState extends State { @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: "COVID-19 TEST", + appBarTitle: TranslationBase.of(context).covidTest, isShowAppBar: true, body: SingleChildScrollView( child: Container( @@ -57,8 +57,8 @@ class _CovidPaymentDetailsState extends State { children: [ Container( margin: EdgeInsets.only( - left: 20.0, right: 20.0, top: 40.0), - child: Text("COVID-19 TEST", + left: 20.0, right: 20.0, top: 20.0), + child: Text(TranslationBase.of(context).covidTest, style: TextStyle( color: Colors.white, fontWeight: FontWeight.bold, @@ -67,7 +67,7 @@ class _CovidPaymentDetailsState extends State { Container( margin: EdgeInsets.only( left: 20.0, right: 20.0, top: 10.0), - child: Text("Drive-Thru", + child: Text(TranslationBase.of(context).driveThru, style: TextStyle( color: Colors.white, fontSize: 24.0)), ), @@ -88,7 +88,7 @@ class _CovidPaymentDetailsState extends State { alignment: Alignment.center, margin: EdgeInsets.only(left: 0.0, right: 20.0, top: 30.0), - child: Text("Test Fees", + child: Text(TranslationBase.of(context).testFee, style: TextStyle( color: Colors.black, fontSize: 22.0, @@ -156,7 +156,7 @@ class _CovidPaymentDetailsState extends State { Container( alignment: Alignment.center, margin: EdgeInsets.fromLTRB(20.0, 15.0, 20.0, 5.0), - child: Text("You can pay by following options: ", + child: Text(TranslationBase.of(context).payOptions, textAlign: TextAlign.center, style: TextStyle( fontSize: 16.0, @@ -197,7 +197,7 @@ class _CovidPaymentDetailsState extends State { onPressed: () { cancel(); }, - child: Text("CANCEL", style: TextStyle(fontSize: 18.0)), + child: Text(TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0)), ), ), ), @@ -218,7 +218,7 @@ class _CovidPaymentDetailsState extends State { disabledTextColor: Colors.white, disabledColor: Colors.grey[500], onPressed: isAgree ? next : null, - child: Text("NEXT", style: TextStyle(fontSize: 18.0)), + child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 18.0)), ), ), ), diff --git a/lib/pages/livecare/livecare_home.dart b/lib/pages/livecare/livecare_home.dart index 1974753f..bbad8d4c 100644 --- a/lib/pages/livecare/livecare_home.dart +++ b/lib/pages/livecare/livecare_home.dart @@ -3,12 +3,10 @@ import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCarePendingReque import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_list.dart'; import 'package:diplomaticquarterapp/pages/livecare/widgets/livecare_logs.dart'; import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; -import 'package:smart_progress_bar/smart_progress_bar.dart'; - -import 'livecare_type_select.dart'; class LiveCareHome extends StatefulWidget { static bool showFooterButton = true; @@ -35,7 +33,9 @@ class _LiveCareHomeState extends State pendingERRequestHistoryList = new ErRequestHistoryList(); - WidgetsBinding.instance.addPostFrameCallback((_) => getLiveCareHistory()); + WidgetsBinding.instance.addPostFrameCallback((_) { + if (!isDataLoaded) getLiveCareHistory(); + }); super.initState(); } @@ -89,6 +89,7 @@ class _LiveCareHomeState extends State } void getLiveCareHistory() { + GifLoaderDialogUtils.showMyDialog(context); setState(() { isDataLoaded = false; hasLiveCareRequest = false; @@ -96,38 +97,31 @@ class _LiveCareHomeState extends State LiveCareService service = new LiveCareService(); PatientERVirtualHistoryResponse patientERVirtualHistoryResponse = new PatientERVirtualHistoryResponse(); - service - .getLivecareHistory(context) - .then((res) { - setState(() { - print(res['ErRequestHistoryList'].length); - if (res['ErRequestHistoryList'].length != 0) { - patientERVirtualHistoryResponse = - PatientERVirtualHistoryResponse.fromJson(res); - erRequestHistoryList = - patientERVirtualHistoryResponse.erRequestHistoryList; + service.getLivecareHistory(context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + setState(() { + print(res['ErRequestHistoryList'].length); + if (res['ErRequestHistoryList'].length != 0) { + patientERVirtualHistoryResponse = + PatientERVirtualHistoryResponse.fromJson(res); + erRequestHistoryList = + patientERVirtualHistoryResponse.erRequestHistoryList; - if (patientERVirtualHistoryResponse - .erRequestHistoryList[0].callStatus < - 4) { - pendingERRequestHistoryList = - patientERVirtualHistoryResponse.erRequestHistoryList[0]; - hasLiveCareRequest = true; - } else { - hasLiveCareRequest = false; - } - } - }); - }) - .catchError((err) { - print(err); - }) - .showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) - .then((value) { - setState(() { - isDataLoaded = true; - }); - }); + if (patientERVirtualHistoryResponse + .erRequestHistoryList[0].callStatus < + 4) { + pendingERRequestHistoryList = + patientERVirtualHistoryResponse.erRequestHistoryList[0]; + hasLiveCareRequest = true; + } else { + hasLiveCareRequest = false; + } + } + isDataLoaded = true; + }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); } } diff --git a/lib/pages/livecare/livecare_scheduling/schedule_clinic_card.dart b/lib/pages/livecare/livecare_scheduling/schedule_clinic_card.dart index 19144263..72ca4ce9 100644 --- a/lib/pages/livecare/livecare_scheduling/schedule_clinic_card.dart +++ b/lib/pages/livecare/livecare_scheduling/schedule_clinic_card.dart @@ -36,7 +36,7 @@ class _ScheduleClinicCardState extends State { child: Text( widget.languageID == 'ar' ? widget.clinicsHaveScheduleList.clinicDescN != null ? widget.clinicsHaveScheduleList.clinicDescN: "" - : widget.clinicsHaveScheduleList.clinicDesc != null ? widget.clinicsHaveScheduleList.clinicDesc: "Dermatology", + : widget.clinicsHaveScheduleList.clinicDesc != null ? widget.clinicsHaveScheduleList.clinicDesc: "Test Clinic", style: TextStyle( fontSize: 16.0, color: diff --git a/lib/pages/livecare/livecare_type_select.dart b/lib/pages/livecare/livecare_type_select.dart index 833c9698..00c2b717 100644 --- a/lib/pages/livecare/livecare_type_select.dart +++ b/lib/pages/livecare/livecare_type_select.dart @@ -51,20 +51,19 @@ class _LiveCareTypeSelectState extends State { ), Container( alignment: Alignment.center, - child: Text("LiveCare Service", + child: Text(TranslationBase.of(context).livecareService, style: TextStyle( fontWeight: FontWeight.bold, fontSize: 20.0))), Container( margin: EdgeInsets.only(top: 10.0), alignment: Alignment.center, child: Text( - "is to obtain medical advice with a specialist doctor Via a video call", + TranslationBase.of(context).livecareServiceDesc, textAlign: TextAlign.center, style: TextStyle(fontSize: 18.0))), Container( margin: EdgeInsets.only(top: 15.0), - alignment: Alignment.centerLeft, - child: Text("WHY LIVECARE?", + child: Text(TranslationBase.of(context).whyLivecare, style: TextStyle( fontWeight: FontWeight.bold, fontSize: 20.0))), Container( @@ -77,7 +76,7 @@ class _LiveCareTypeSelectState extends State { width: MediaQuery.of(context).size.width * 0.72, margin: EdgeInsets.all(10.0), child: Text( - "No need to wait, you will get Medical consultation immediately via Video call.", + TranslationBase.of(context).livecarePoint1, overflow: TextOverflow.clip, style: TextStyle(fontSize: 14.0)), ) @@ -93,7 +92,7 @@ class _LiveCareTypeSelectState extends State { Container( width: MediaQuery.of(context).size.width * 0.72, margin: EdgeInsets.all(10.0), - child: Text("The doctor will see your medical file.", + child: Text(TranslationBase.of(context).docVirtualAppoIns4, overflow: TextOverflow.clip, style: TextStyle(fontSize: 14.0)), ) @@ -109,7 +108,7 @@ class _LiveCareTypeSelectState extends State { Container( width: MediaQuery.of(context).size.width * 0.72, margin: EdgeInsets.all(10.0), - child: Text("Free Prescription delivery service.", + child: Text(TranslationBase.of(context).docVirtualAppoIns5, overflow: TextOverflow.clip, style: TextStyle(fontSize: 14.0)), ) @@ -119,7 +118,7 @@ class _LiveCareTypeSelectState extends State { Container( margin: EdgeInsets.only(top: 20.0), child: Text( - "** The service is included with some insurance companies according to the terms and conditions With our best wishes for health and wellness", + TranslationBase.of(context).livecareSummary, style: TextStyle(fontSize: 16.0))), InkWell( onTap: (){ @@ -134,7 +133,7 @@ class _LiveCareTypeSelectState extends State { child: Row( children: [ Container( - margin: EdgeInsets.only(left: 20.0), + margin: EdgeInsets.only(left: 10.0, right: 10.0), child: SvgPicture.asset( "assets/images/new-design/liveCare_logo_icon_white.svg", width: 80), @@ -144,7 +143,7 @@ class _LiveCareTypeSelectState extends State { margin: EdgeInsets.fromLTRB(30.0, 20.0, 0.0, 0.0), child: Column( children: [ - Text("Get Medical consultation immediately", + Text(TranslationBase.of(context).livecareOption1, overflow: TextOverflow.clip, style: TextStyle( fontWeight: FontWeight.bold, @@ -152,8 +151,7 @@ class _LiveCareTypeSelectState extends State { color: Colors.white)), Container( margin: EdgeInsets.only(top: 10.0), - alignment: Alignment.centerLeft, - child: Text("Instant video call", + child: Text(TranslationBase.of(context).livecareOption2, style: TextStyle( fontSize: 18.0, color: Colors.white)), ) @@ -176,19 +174,18 @@ class _LiveCareTypeSelectState extends State { child: Row( children: [ Container( - margin: EdgeInsets.only(left: 20.0), + margin: EdgeInsets.only(left: 10.0, right: 10.0), child: Image.asset( "assets/images/new-design/calendar.png", width: 70), ), Container( width: MediaQuery.of(context).size.width * 0.58, - margin: EdgeInsets.fromLTRB(30.0, 30.0, 0.0, 0.0), + margin: EdgeInsets.fromLTRB(30.0, 20.0, 0.0, 0.0), child: Column( children: [ Container( - alignment: Alignment.centerLeft, - child: Text("Book Appointment", + child: Text(TranslationBase.of(context).livecareOption3, overflow: TextOverflow.clip, style: TextStyle( fontWeight: FontWeight.bold, @@ -197,8 +194,7 @@ class _LiveCareTypeSelectState extends State { ), Container( margin: EdgeInsets.only(top: 10.0), - alignment: Alignment.centerLeft, - child: Text("Schedule Video Call", + child: Text(TranslationBase.of(context).livecareOption4, style: TextStyle( fontSize: 18.0, color: Colors.white)), ) diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index 195d8879..5cfdacc6 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -54,6 +54,8 @@ class _clinic_listState extends State { MyInAppBrowser browser; + bool isLiveCareTypeSelected = false; + @override void initState() { liveCareClinicsListResponse = new LiveCareClinicsListResponse(); @@ -61,7 +63,7 @@ class _clinic_listState extends State { new LiveCareScheduleClinicsListResponse(); WidgetsBinding.instance.addPostFrameCallback((_) { - openLiveCareSelectionDialog(); + if (!isLiveCareTypeSelected) openLiveCareSelectionDialog(); }); getLanguageID(); @@ -431,6 +433,7 @@ class _clinic_listState extends State { Navigator.pop(context); } else { print(value); + isLiveCareTypeSelected = true; if (value == "immediate") { setState(() { currentSelectedLiveCareType = "immediate"; diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 82d3d5c4..d82a74fe 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -1381,6 +1381,33 @@ class TranslationBase { String get systolicAdd => localizedValues["systolic-add"][locale.languageCode]; String get diastolicAdd => localizedValues["systolic-add"][locale.languageCode]; String get cmcHeading => localizedValues["cmc-heading"][locale.languageCode]; + String get selectLocation => localizedValues["select-location"][locale.languageCode]; + String get resultHeader => localizedValues["result-header"][locale.languageCode]; + String get covidInfo => localizedValues["covid-info"][locale.languageCode]; + String get selectAppo => localizedValues["select-appo"][locale.languageCode]; + String get covidAlertHeader => localizedValues["covid-alert-header"][locale.languageCode]; + String get covidAlertInfo => localizedValues["covid-alert-info"][locale.languageCode]; + String get covidAlertMins => localizedValues["covid-alert-mins"][locale.languageCode]; + String get back => localizedValues["back"][locale.languageCode]; + String get getDirections => localizedValues["get-directions"][locale.languageCode]; + String get selectedLocation => localizedValues["selected-location"][locale.languageCode]; + String get testFee => localizedValues["test-fee"][locale.languageCode]; + String get payOptions => localizedValues["pay-options"][locale.languageCode]; + String get livecareService => localizedValues["livecare-service"][locale.languageCode]; + String get livecareServiceDesc => localizedValues["livecare-service-desc"][locale.languageCode]; + String get whyLivecare => localizedValues["why-livecare"][locale.languageCode]; + String get livecarePoint1 => localizedValues["livecare-point-1"][locale.languageCode]; + String get docVirtualAppoIns4 => localizedValues["doc-virtual-appo-ins4"][locale.languageCode]; + String get docVirtualAppoIns5 => localizedValues["doc-virtual-appo-ins5"][locale.languageCode]; + String get livecareSummary => localizedValues["livecare-summary"][locale.languageCode]; + + String get livecareOption1 => localizedValues["livecare-option-1"][locale.languageCode]; + String get livecareOption2 => localizedValues["livecare-option-2"][locale.languageCode]; + String get livecareOption3 => localizedValues["livecare-option-3"][locale.languageCode]; + String get livecareOption4 => localizedValues["livecare-option-4"][locale.languageCode]; + + + }