diff --git a/lib/config/config.dart b/lib/config/config.dart index 10e6dc58..65c02a4d 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -22,13 +22,13 @@ 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://hmgwebservices.com/'; // var BASE_URL = 'http://10.201.204.103/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; -var BASE_URL = 'https://webservices.hmg.com/'; +// var BASE_URL = 'https://webservices.hmg.com/'; // var BASE_URL = 'http://10.50.100.198:4422/'; @@ -354,7 +354,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 18.5; +var VERSION_ID = 18.6; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/pages/BookAppointment/components/search_by_hospital_name.dart b/lib/pages/BookAppointment/components/search_by_hospital_name.dart index db3a0b44..b6b04e30 100644 --- a/lib/pages/BookAppointment/components/search_by_hospital_name.dart +++ b/lib/pages/BookAppointment/components/search_by_hospital_name.dart @@ -51,10 +51,10 @@ class _SearchByHospitalState extends State { @override void initState() { WidgetsBinding.instance.addPostFrameCallback((_) { + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + locationUtils.getCurrentLocation(); getProjectsList(); }); - locationUtils = - new LocationUtils(isShowConfirmDialog: true, context: context); } @override @@ -290,18 +290,15 @@ class _SearchByHospitalState extends State { service.getProjectsList(languageID, context).then((res) async { if (res['MessageStatus'] == 1) { res['ListProject'].forEach((v) { - projectsListLocal.add(new HospitalsModel.fromJson(v)); - }); - projectsList = projectsListLocal; - hospitalList = await DoctorMapper.getMappedHospitals(projectsList, - isArabic: context.read().isArabic); + projectsListLocal.add(new HospitalsModel.fromJson(v)); + }); + projectsList = projectsListLocal; + hospitalList = await DoctorMapper.getMappedHospitals(projectsList, isArabic: context.read().isArabic); var lat = await sharedPref.getDouble(USER_LAT); var lng = await sharedPref.getDouble(USER_LONG); - var isLocationEnabled = - (lat != null && lat != 0.0) && (lng != null && lng != 0.0); - hospitalList = - await DoctorMapper.sortList(isLocationEnabled, hospitalList!); + var isLocationEnabled = (lat != null && lat != 0.0) && (lng != null && lng != 0.0); + hospitalList = await DoctorMapper.sortList(isLocationEnabled, hospitalList!); setState(() {}); GifLoaderDialogUtils.hideDialog(context); } else {} @@ -428,14 +425,7 @@ class _SearchByHospitalState extends State { DoctorsListService service = new DoctorsListService(); service - .getDoctorsList( - clinicID, - selectedHospital?.mainProjectID.toString() != "" - ? int.parse(selectedHospital?.mainProjectID.toString() ?? "-1") - : 0, - nearestAppo, - languageID, - null) + .getDoctorsList(clinicID, selectedHospital?.mainProjectID.toString() != "" ? int.parse(selectedHospital?.mainProjectID.toString() ?? "-1") : 0, nearestAppo, languageID, null) .then((res) async { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { @@ -448,15 +438,12 @@ class _SearchByHospitalState extends State { )); }); - regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, - isArabic: isArabic); + regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, isArabic: isArabic); var lat = await sharedPref.getDouble(USER_LAT); var lng = await sharedPref.getDouble(USER_LONG); - var isLocationEnabled = (lat != null && lat != 0.0) && - (lng != null && lng != 0.0); - regionHospitalList = - await DoctorMapper.sortList(isLocationEnabled, regionHospitalList); + var isLocationEnabled = (lat != null && lat != 0.0) && (lng != null && lng != 0.0); + regionHospitalList = await DoctorMapper.sortList(isLocationEnabled, regionHospitalList); setState(() {}); } else { diff --git a/lib/pages/BookAppointment/search_result/ResultByClinic.dart b/lib/pages/BookAppointment/search_result/ResultByClinic.dart index 6d7b5592..088994cd 100644 --- a/lib/pages/BookAppointment/search_result/ResultByClinic.dart +++ b/lib/pages/BookAppointment/search_result/ResultByClinic.dart @@ -27,8 +27,7 @@ class ResultByClinic extends StatefulWidget { HospitalsModel? selectedValue; Function(RegionList) onClinicSelected; - ResultByClinic( - {super.key, this.selectedValue, required this.onClinicSelected}); + ResultByClinic({super.key, this.selectedValue, required this.onClinicSelected}); @override State createState() => _ResultByClinicState(); @@ -40,8 +39,7 @@ class _ResultByClinicState extends State { @override void initState() { super.initState(); - WidgetsBinding.instance.addPostFrameCallback( - (_) => getClinicWrtHospital(widget.selectedValue)); + WidgetsBinding.instance.addPostFrameCallback((_) => getClinicWrtHospital(widget.selectedValue)); } @override @@ -52,66 +50,56 @@ class _ResultByClinicState extends State { child: clinicIds?.isNotEmpty == true ? ListView.builder( itemBuilder: (_, index) => InkWell( - onTap: () { - getDoctorsList( - context, - "${clinicIds?[index].clinicID.toString() ?? ''}-${clinicIds?[index].isLiveCareClinicAndOnline!.toString()}-${clinicIds?[index].liveCareClinicID.toString()}-${clinicIds?[index].liveCareServiceID.toString()}", - clinicIds?[index].clinicDescription!, - widget.selectedValue, - clinicIds?[index]); - }, - child: Material( - color: CustomColors.white, - child: Padding( - padding: - const EdgeInsets.symmetric(horizontal: 16, vertical: 24), - child: Row( - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - clinicIds?[index].clinicDescription ?? '', - style: TextStyle( - fontSize: 22, - color: Colors.black, - fontWeight: FontWeight.w700), - ), - ], - ), + onTap: () { + getDoctorsList( + context, + "${clinicIds?[index].clinicID.toString() ?? ''}-${clinicIds?[index].isLiveCareClinicAndOnline!.toString()}-${clinicIds?[index].liveCareClinicID.toString()}-${clinicIds?[index].liveCareServiceID.toString()}", + clinicIds?[index].clinicDescription!, + widget.selectedValue, + clinicIds?[index]); + }, + child: Material( + color: CustomColors.white, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 24), + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + clinicIds?[index].clinicDescription ?? '', + style: TextStyle(fontSize: 22, color: Colors.black, fontWeight: FontWeight.w700), + ), + ], + ), + ), + Padding( + padding: EdgeInsets.all(8), + child: Center( + child: Icon( + Icons.arrow_forward_ios, + color: CustomColors.black, + size: 16, + ), + ), + ), + ], + )), ), - Padding( - padding: EdgeInsets.all(8), - child: Center( - child: Icon( - Icons.arrow_forward_ios, - color: CustomColors.black, - size: 16, - ), - ), - ), - ], - )), - ), - ), - itemCount: clinicIds?.length ?? 0, + ), + itemCount: clinicIds?.length ?? 0, ) : getNoDataWidget(context)), ], ); } - getDoctorsList( - BuildContext context, - String? dropdownValue, - String? dropdownTitle, - HospitalsModel? selectedHospital, - ListClinicCentralized? selectedClinic) { + getDoctorsList(BuildContext context, String? dropdownValue, String? dropdownTitle, HospitalsModel? selectedHospital, ListClinicCentralized? selectedClinic) { SearchInfo searchInfo = new SearchInfo(); if (dropdownValue != null) if (dropdownValue!.split("-")[0] == "17") { - searchInfo.ProjectID = - int.parse(selectedHospital?.mainProjectID.toString() ?? ""); + searchInfo.ProjectID = int.parse(selectedHospital?.mainProjectID.toString() ?? ""); searchInfo.ClinicID = int.parse(dropdownValue!.split("-")[0]); searchInfo.hospital = selectedHospital; searchInfo.clinic = selectedClinic; @@ -136,10 +124,7 @@ class _ResultByClinicState extends State { Navigator.push( context, FadePage( - page: LiveCareBookAppointment( - clinicName: dropdownTitle, - liveCareClinicID: dropdownValue!.split("-")[2], - liveCareServiceID: dropdownValue!.split("-")[3]), + page: LiveCareBookAppointment(clinicName: dropdownTitle, liveCareClinicID: dropdownValue!.split("-")[2], liveCareServiceID: dropdownValue!.split("-")[3]), ), ).then((value) { print("navigation return "); @@ -169,8 +154,7 @@ class _ResultByClinicState extends State { ).then((value) {}); } - Future navigateToDentalComplaints( - BuildContext context, SearchInfo searchInfo) async { + Future navigateToDentalComplaints(BuildContext context, SearchInfo searchInfo) async { Navigator.push( context, FadePage( @@ -195,20 +179,11 @@ class _ResultByClinicState extends State { List arrDistance = []; List result; int numAll; - List _patientDoctorAppointmentListHospital = - []; + List _patientDoctorAppointmentListHospital = []; DoctorsListService service = new DoctorsListService(); service - .getDoctorsList( - clinicID, - widget.selectedValue?.mainProjectID.toString() != "" - ? int.parse( - widget.selectedValue?.mainProjectID.toString() ?? "-1") - : 0, - false, - languageID, - null) + .getDoctorsList(clinicID, widget.selectedValue?.mainProjectID.toString() != "" ? int.parse(widget.selectedValue?.mainProjectID.toString() ?? "-1") : 0, false, languageID, null) .then((res) async { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { @@ -221,15 +196,12 @@ class _ResultByClinicState extends State { )); }); - regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, - isArabic: isArabic); + regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, isArabic: isArabic); var lat = await sharedPref.getDouble(USER_LAT); var lng = await sharedPref.getDouble(USER_LONG); - var isLocationEnabled = - (lat != null && lat != 0.0) && (lng != null && lng != 0.0); - regionHospitalList = await DoctorMapper.sortList( - isLocationEnabled, regionHospitalList); + var isLocationEnabled = (lat != null && lat != 0.0) && (lng != null && lng != 0.0); + regionHospitalList = await DoctorMapper.sortList(isLocationEnabled, regionHospitalList); widget.onClinicSelected(regionHospitalList); setState(() {}); } else { @@ -258,8 +230,7 @@ class _ResultByClinicState extends State { clinicIds = List.empty(); List clinicId = []; try { - Map res = await service.getClinicByHospital( - projectID: newValue?.mainProjectID.toString() ?? ""); + Map res = await service.getClinicByHospital(projectID: newValue?.mainProjectID.toString() ?? ""); GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { List list = res['ListClinic']; diff --git a/lib/pages/BookAppointment/search_result/ResultByDoctors.dart b/lib/pages/BookAppointment/search_result/ResultByDoctors.dart index 04c117c0..f374e97c 100644 --- a/lib/pages/BookAppointment/search_result/ResultByDoctors.dart +++ b/lib/pages/BookAppointment/search_result/ResultByDoctors.dart @@ -14,15 +14,16 @@ class ResultByDoctor extends StatefulWidget { final bool isDoctorNameSearch; final bool isDoctorSearchResult; final OBGyneProcedureListResponse? obGyneProcedureListResponse; - ResultByDoctor( - {required this.doctorsList, - required this.patientDoctorAppointmentListHospital, - required this.isLiveCareAppointment, - required this.isObGyneAppointment, - required this.isDoctorNameSearch, - required this.isDoctorSearchResult, - this.obGyneProcedureListResponse, - }); + + ResultByDoctor({ + required this.doctorsList, + required this.patientDoctorAppointmentListHospital, + required this.isLiveCareAppointment, + required this.isObGyneAppointment, + required this.isDoctorNameSearch, + required this.isDoctorSearchResult, + this.obGyneProcedureListResponse, + }); @override State createState() => _ResultByDoctorState(); @@ -47,28 +48,20 @@ class _ResultByDoctorState extends State { ); }, itemBuilder: (context, index) { - final doctor = - widget.patientDoctorAppointmentListHospital![index]; + final doctor = widget.patientDoctorAppointmentListHospital![index]; return DoctorView( - doctor: doctor, + doctor: doctor, isLiveCareAppointment: widget.isLiveCareAppointment, isObGyneAppointment: widget.isObGyneAppointment, isDoctorNameSearch: widget.isDoctorNameSearch, - obGyneProcedureListResponse: - widget.obGyneProcedureListResponse, + obGyneProcedureListResponse: widget.obGyneProcedureListResponse, isShowDate: false, - onTap: () { - context - .read() - .analytics - .appointment - .book_appointment_select_doctor( - appointment_type: 'regular', doctor: doctor); - }); + onTap: () { + context.read().analytics.appointment.book_appointment_select_doctor(appointment_type: 'regular', doctor: doctor); + }); }, - itemCount: - widget.patientDoctorAppointmentListHospital?.length ?? 0, + itemCount: widget.patientDoctorAppointmentListHospital?.length ?? 0, ), ) : getNoDataWidget(context), diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index 4a3334cd..9805a691 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -154,7 +154,8 @@ class _AppointmentDetailsState extends State with SingleTick onTap: (index) { setState(() { if (index == 1) { - if (widget.appo.clinicID == 17 || + if ( + // widget.appo.clinicID == 17 || widget.appo.clinicID == 47 || widget.appo.clinicID == 23 || widget.appo.clinicID == 253 || @@ -173,7 +174,7 @@ class _AppointmentDetailsState extends State with SingleTick }, tabs: [ Tab(child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))), - widget.appo.clinicID == 17 || + // widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.clinicID == 47 || widget.appo.clinicID == 265 || diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart index 17d463d3..f519353c 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart @@ -8,8 +8,10 @@ import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_mode import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart'; @@ -83,12 +85,11 @@ class _AppointmentActionsState extends State { shrinkWrap: true, itemBuilder: (context, index) { // bool shouldEnable = ((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) || (widget.appo.isLiveCareAppointment && appoButtonsList[index].caller == "askDoc") || appoButtonsList[index].caller == "openReschedule"); - bool shouldEnable = - (((widget.appo.clinicID == 17 || widget.appo.clinicID == 47 || widget.appo.clinicID == 134 || widget.appo.clinicID == 253) && appoButtonsList[index].caller == "openReschedule") || - (widget.appo.isLiveCareAppointment! && appoButtonsList[index].caller == "askDoc") || - (Utils.isVidaPlusProject(projectViewModel, widget.appo.projectID) && - widget.appo.clinicID == 10 && - (appoButtonsList[index].caller == "prescriptions" || appoButtonsList[index].caller == "radiology" || appoButtonsList[index].caller == "labResult"))); + bool shouldEnable = (((widget.appo.clinicID == 47 || widget.appo.clinicID == 134 || widget.appo.clinicID == 253) && appoButtonsList[index].caller == "openReschedule") || + (widget.appo.isLiveCareAppointment! && appoButtonsList[index].caller == "askDoc") || + (Utils.isVidaPlusProject(projectViewModel, widget.appo.projectID) && + widget.appo.clinicID == 10 && + (appoButtonsList[index].caller == "prescriptions" || appoButtonsList[index].caller == "radiology" || appoButtonsList[index].caller == "labResult"))); return InkWell( onTap: shouldEnable ? null diff --git a/lib/pages/login/user-login-agreement-page.dart b/lib/pages/login/user-login-agreement-page.dart index ea40411e..96e67f14 100644 --- a/lib/pages/login/user-login-agreement-page.dart +++ b/lib/pages/login/user-login-agreement-page.dart @@ -23,7 +23,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:provider/provider.dart'; -import 'package:url_launcher/url_launcher.dart'; import 'package:webview_flutter/webview_flutter.dart'; class UserLoginAgreementPage extends StatefulWidget { @@ -45,7 +44,7 @@ class _UserLoginAgreementPageState extends State { final authService = AuthProvider(); late final WebViewController _controller; - bool isPageLoaded = true; + bool isPageLoaded = false; bool isTermsAndConditionsPage = true; bool acceptTerms = false; @@ -53,31 +52,31 @@ class _UserLoginAgreementPageState extends State { @override void initState() { super.initState(); - // _controller = WebViewController() - // ..setJavaScriptMode(JavaScriptMode.unrestricted) - // ..setNavigationDelegate( - // NavigationDelegate( - // onProgress: (int progress) { - // // Update loading bar. - // print("Progress: $progress"); - // }, - // onPageStarted: (String url) {}, - // onPageFinished: (String url) { - // setState(() { - // isPageLoaded = true; - // }); - // }, - // onHttpError: (HttpResponseError error) {}, - // onWebResourceError: (WebResourceError error) {}, - // onNavigationRequest: (NavigationRequest request) { - // if (request.url.startsWith('https://www.youtube.com/')) { - // return NavigationDecision.prevent; - // } - // return NavigationDecision.navigate; - // }, - // ), - // ) - // ..loadRequest(Uri.parse(widget.isArabic ? "https://hmg.com/ar/Pages/Privacy.aspx" : "https://hmg.com/en/Pages/Privacy.aspx")); + _controller = WebViewController() + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..setNavigationDelegate( + NavigationDelegate( + onProgress: (int progress) { + // Update loading bar. + print("Progress: $progress"); + }, + onPageStarted: (String url) {}, + onPageFinished: (String url) { + setState(() { + isPageLoaded = true; + }); + }, + onHttpError: (HttpResponseError error) {}, + onWebResourceError: (WebResourceError error) {}, + onNavigationRequest: (NavigationRequest request) { + if (request.url.startsWith('https://www.youtube.com/')) { + return NavigationDecision.prevent; + } + return NavigationDecision.navigate; + }, + ), + ) + ..loadRequest(Uri.parse(widget.isArabic ? "https://hmg.com/ar/Pages/MBTerms.aspx" : "https://hmg.com/en/Pages/MBTerms.aspx")); } @override @@ -94,16 +93,17 @@ class _UserLoginAgreementPageState extends State { body: // isTermsAndConditionsPage // ? - getTermsAndConditionsContent(), - // : isPageLoaded - // ? WebViewWidget(controller: _controller) - // : Container( - // child: Center( - // child: GifLoaderContainer( - // barrierDismissible: false, - // ), - // ), - // ), + // getTermsAndConditionsContent(), + // : + isPageLoaded + ? WebViewWidget(controller: _controller) + : Container( + child: Center( + child: GifLoaderContainer( + barrierDismissible: false, + ), + ), + ), // Padding( // padding: const EdgeInsets.all(8.0), // child: SingleChildScrollView(child: WebViewWidget(controller: _controller) @@ -142,6 +142,24 @@ class _UserLoginAgreementPageState extends State { letterSpacing: -0.64, ), ), + mHeight(24.0), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Checkbox( + value: acceptTerms, + onChanged: (v) { + setState(() => acceptTerms = v!); + }), + Expanded( + child: Text( + TranslationBase.of(context).termsConditionsRead, + style: TextStyle( + fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + ), + ], + ), SizedBox(height: 12), Row( mainAxisAlignment: MainAxisAlignment.end, @@ -156,24 +174,22 @@ class _UserLoginAgreementPageState extends State { child: CustomTextButton( backgroundColor: CustomColors.green, elevation: 0, - onPressed: - // isPageLoaded - // ? - () { - // if (isTermsAndConditionsPage) { - if (acceptTerms) { - addUsageAgreement(); - // setState(() { - // isTermsAndConditionsPage = false; - // }); - } else { - AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms); - } - // } else { - // addUsageAgreement(); - // } - }, - // : null, + onPressed: isPageLoaded + ? () { + // if (isTermsAndConditionsPage) { + if (acceptTerms) { + addUsageAgreement(); + // setState(() { + // isTermsAndConditionsPage = false; + // }); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms); + } + // } else { + // addUsageAgreement(); + // } + } + : null, child: Text(TranslationBase.of(context).acceptLbl.toUpperCase(), style: TextStyle( fontSize: 18.0, @@ -244,22 +260,23 @@ class _UserLoginAgreementPageState extends State { style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), ), mHeight(12.0), - InkWell( - onTap: () async { - await launchUrl(Uri.parse(widget.isArabic ? "https://hmg.com/ar/Pages/Privacy.aspx" : "https://hmg.com/en/Pages/Privacy.aspx")); - }, - child: Text( - TranslationBase.of(context).clickPrivacyPolicy, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.bold, - fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), - color: Colors.blue, - letterSpacing: -1.44, - height: 35 / 24, - decoration: TextDecoration.underline), - ), - ), + // InkWell( + // onTap: () async { + // await launchUrl(uri); + // Uri.parse(widget.isArabic ? "https://hmg.com/ar/Pages/Privacy.aspx" : "https://hmg.com/en/Pages/Privacy.aspx"); + // }, + // child: Text( + // TranslationBase.of(context).clickPrivacyPolicy, + // style: TextStyle( + // fontSize: 16, + // fontWeight: FontWeight.bold, + // fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), + // color: Colors.blue, + // letterSpacing: -1.44, + // height: 35 / 24, + // decoration: TextDecoration.underline), + // ), + // ), mHeight(12.0), Text( TranslationBase.of(context).termsConditions4, diff --git a/lib/splashPage.dart b/lib/splashPage.dart index c4afc704..3d9b2927 100644 --- a/lib/splashPage.dart +++ b/lib/splashPage.dart @@ -79,7 +79,11 @@ class _SplashScreenState extends State { projectProvider.setVidaPlusProjectList(_privilegeService.vidaPlusProjectListModel); projectProvider.setHMCProjectList(_privilegeService.hMCProjectListModel); projectProvider.setProjectsDetailList(_privilegeService.projectDetailListModel); + double lat = await AppSharedPreferences().getDouble(USER_LAT) ?? 0.0; + double long = await AppSharedPreferences().getDouble(USER_LONG) ?? 0.0; AppSharedPreferences().clear(); // Clearing Shared Preferences On App Launch + await AppSharedPreferences().setDouble(USER_LAT, lat); + await AppSharedPreferences().setDouble(USER_LONG, long); AppSharedPreferences().setString(APP_LANGUAGE, projectProvider.isArabic ? "ar" : "en"); var themeNotifier = Provider.of(context, listen: false); themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins')); diff --git a/pubspec.yaml b/pubspec.yaml index 54cbd1ec..ae96d0bf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.6.092+4050092 +version: 4.6.093+4050093 environment: sdk: ">=3.0.0 <3.13.0"