Update to stores VersionID 18.6

merge-update-with-lab-changes
haroon amjad 9 months ago
parent 1ee86d0813
commit fff45cd3a8

@ -22,13 +22,13 @@ var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/'; // var BASE_URL = 'http://10.50.100.198:2018/';
// var BASE_URL = 'https://uat.hmgwebservices.com/'; // 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 = 'http://10.201.204.103/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidamergeuat.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/'; // 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 CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 18.5; var VERSION_ID = 18.6;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // var PATIENT_OUT_SA = 0;

@ -51,10 +51,10 @@ class _SearchByHospitalState extends State<SearchByHospital> {
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation();
getProjectsList(); getProjectsList();
}); });
locationUtils =
new LocationUtils(isShowConfirmDialog: true, context: context);
} }
@override @override
@ -290,18 +290,15 @@ class _SearchByHospitalState extends State<SearchByHospital> {
service.getProjectsList(languageID, context).then((res) async { service.getProjectsList(languageID, context).then((res) async {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
res['ListProject'].forEach((v) { res['ListProject'].forEach((v) {
projectsListLocal.add(new HospitalsModel.fromJson(v)); projectsListLocal.add(new HospitalsModel.fromJson(v));
}); });
projectsList = projectsListLocal; projectsList = projectsListLocal;
hospitalList = await DoctorMapper.getMappedHospitals(projectsList, hospitalList = await DoctorMapper.getMappedHospitals(projectsList, isArabic: context.read<ProjectViewModel>().isArabic);
isArabic: context.read<ProjectViewModel>().isArabic);
var lat = await sharedPref.getDouble(USER_LAT); var lat = await sharedPref.getDouble(USER_LAT);
var lng = await sharedPref.getDouble(USER_LONG); var lng = await sharedPref.getDouble(USER_LONG);
var isLocationEnabled = var isLocationEnabled = (lat != null && lat != 0.0) && (lng != null && lng != 0.0);
(lat != null && lat != 0.0) && (lng != null && lng != 0.0); hospitalList = await DoctorMapper.sortList(isLocationEnabled, hospitalList!);
hospitalList =
await DoctorMapper.sortList(isLocationEnabled, hospitalList!);
setState(() {}); setState(() {});
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
} else {} } else {}
@ -428,14 +425,7 @@ class _SearchByHospitalState extends State<SearchByHospital> {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.getDoctorsList( .getDoctorsList(clinicID, selectedHospital?.mainProjectID.toString() != "" ? int.parse(selectedHospital?.mainProjectID.toString() ?? "-1") : 0, nearestAppo, languageID, null)
clinicID,
selectedHospital?.mainProjectID.toString() != ""
? int.parse(selectedHospital?.mainProjectID.toString() ?? "-1")
: 0,
nearestAppo,
languageID,
null)
.then((res) async { .then((res) async {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
@ -448,15 +438,12 @@ class _SearchByHospitalState extends State<SearchByHospital> {
)); ));
}); });
regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, isArabic: isArabic);
isArabic: isArabic);
var lat = await sharedPref.getDouble(USER_LAT); var lat = await sharedPref.getDouble(USER_LAT);
var lng = await sharedPref.getDouble(USER_LONG); var lng = await sharedPref.getDouble(USER_LONG);
var isLocationEnabled = (lat != null && lat != 0.0) && var isLocationEnabled = (lat != null && lat != 0.0) && (lng != null && lng != 0.0);
(lng != null && lng != 0.0); regionHospitalList = await DoctorMapper.sortList(isLocationEnabled, regionHospitalList);
regionHospitalList =
await DoctorMapper.sortList(isLocationEnabled, regionHospitalList);
setState(() {}); setState(() {});
} else { } else {

@ -27,8 +27,7 @@ class ResultByClinic extends StatefulWidget {
HospitalsModel? selectedValue; HospitalsModel? selectedValue;
Function(RegionList) onClinicSelected; Function(RegionList) onClinicSelected;
ResultByClinic( ResultByClinic({super.key, this.selectedValue, required this.onClinicSelected});
{super.key, this.selectedValue, required this.onClinicSelected});
@override @override
State<ResultByClinic> createState() => _ResultByClinicState(); State<ResultByClinic> createState() => _ResultByClinicState();
@ -40,8 +39,7 @@ class _ResultByClinicState extends State<ResultByClinic> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
WidgetsBinding.instance.addPostFrameCallback( WidgetsBinding.instance.addPostFrameCallback((_) => getClinicWrtHospital(widget.selectedValue));
(_) => getClinicWrtHospital(widget.selectedValue));
} }
@override @override
@ -52,66 +50,56 @@ class _ResultByClinicState extends State<ResultByClinic> {
child: clinicIds?.isNotEmpty == true child: clinicIds?.isNotEmpty == true
? ListView.builder( ? ListView.builder(
itemBuilder: (_, index) => InkWell( itemBuilder: (_, index) => InkWell(
onTap: () { onTap: () {
getDoctorsList( getDoctorsList(
context, context,
"${clinicIds?[index].clinicID.toString() ?? ''}-${clinicIds?[index].isLiveCareClinicAndOnline!.toString()}-${clinicIds?[index].liveCareClinicID.toString()}-${clinicIds?[index].liveCareServiceID.toString()}", "${clinicIds?[index].clinicID.toString() ?? ''}-${clinicIds?[index].isLiveCareClinicAndOnline!.toString()}-${clinicIds?[index].liveCareClinicID.toString()}-${clinicIds?[index].liveCareServiceID.toString()}",
clinicIds?[index].clinicDescription!, clinicIds?[index].clinicDescription!,
widget.selectedValue, widget.selectedValue,
clinicIds?[index]); clinicIds?[index]);
}, },
child: Material( child: Material(
color: CustomColors.white, color: CustomColors.white,
child: Padding( child: Padding(
padding: padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 24),
const EdgeInsets.symmetric(horizontal: 16, vertical: 24), child: Row(
child: Row( children: [
children: [ Expanded(
Expanded( child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Text(
Text( clinicIds?[index].clinicDescription ?? '',
clinicIds?[index].clinicDescription ?? '', style: TextStyle(fontSize: 22, color: Colors.black, fontWeight: FontWeight.w700),
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), itemCount: clinicIds?.length ?? 0,
child: Center(
child: Icon(
Icons.arrow_forward_ios,
color: CustomColors.black,
size: 16,
),
),
),
],
)),
),
),
itemCount: clinicIds?.length ?? 0,
) )
: getNoDataWidget(context)), : getNoDataWidget(context)),
], ],
); );
} }
getDoctorsList( getDoctorsList(BuildContext context, String? dropdownValue, String? dropdownTitle, HospitalsModel? selectedHospital, ListClinicCentralized? selectedClinic) {
BuildContext context,
String? dropdownValue,
String? dropdownTitle,
HospitalsModel? selectedHospital,
ListClinicCentralized? selectedClinic) {
SearchInfo searchInfo = new SearchInfo(); SearchInfo searchInfo = new SearchInfo();
if (dropdownValue != null) if (dropdownValue!.split("-")[0] == "17") { if (dropdownValue != null) if (dropdownValue!.split("-")[0] == "17") {
searchInfo.ProjectID = searchInfo.ProjectID = int.parse(selectedHospital?.mainProjectID.toString() ?? "");
int.parse(selectedHospital?.mainProjectID.toString() ?? "");
searchInfo.ClinicID = int.parse(dropdownValue!.split("-")[0]); searchInfo.ClinicID = int.parse(dropdownValue!.split("-")[0]);
searchInfo.hospital = selectedHospital; searchInfo.hospital = selectedHospital;
searchInfo.clinic = selectedClinic; searchInfo.clinic = selectedClinic;
@ -136,10 +124,7 @@ class _ResultByClinicState extends State<ResultByClinic> {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: LiveCareBookAppointment( page: LiveCareBookAppointment(clinicName: dropdownTitle, liveCareClinicID: dropdownValue!.split("-")[2], liveCareServiceID: dropdownValue!.split("-")[3]),
clinicName: dropdownTitle,
liveCareClinicID: dropdownValue!.split("-")[2],
liveCareServiceID: dropdownValue!.split("-")[3]),
), ),
).then((value) { ).then((value) {
print("navigation return "); print("navigation return ");
@ -169,8 +154,7 @@ class _ResultByClinicState extends State<ResultByClinic> {
).then((value) {}); ).then((value) {});
} }
Future navigateToDentalComplaints( Future navigateToDentalComplaints(BuildContext context, SearchInfo searchInfo) async {
BuildContext context, SearchInfo searchInfo) async {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
@ -195,20 +179,11 @@ class _ResultByClinicState extends State<ResultByClinic> {
List<String> arrDistance = []; List<String> arrDistance = [];
List<String> result; List<String> result;
int numAll; int numAll;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
[];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.getDoctorsList( .getDoctorsList(clinicID, widget.selectedValue?.mainProjectID.toString() != "" ? int.parse(widget.selectedValue?.mainProjectID.toString() ?? "-1") : 0, false, languageID, null)
clinicID,
widget.selectedValue?.mainProjectID.toString() != ""
? int.parse(
widget.selectedValue?.mainProjectID.toString() ?? "-1")
: 0,
false,
languageID,
null)
.then((res) async { .then((res) async {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
@ -221,15 +196,12 @@ class _ResultByClinicState extends State<ResultByClinic> {
)); ));
}); });
regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, isArabic: isArabic);
isArabic: isArabic);
var lat = await sharedPref.getDouble(USER_LAT); var lat = await sharedPref.getDouble(USER_LAT);
var lng = await sharedPref.getDouble(USER_LONG); var lng = await sharedPref.getDouble(USER_LONG);
var isLocationEnabled = var isLocationEnabled = (lat != null && lat != 0.0) && (lng != null && lng != 0.0);
(lat != null && lat != 0.0) && (lng != null && lng != 0.0); regionHospitalList = await DoctorMapper.sortList(isLocationEnabled, regionHospitalList);
regionHospitalList = await DoctorMapper.sortList(
isLocationEnabled, regionHospitalList);
widget.onClinicSelected(regionHospitalList); widget.onClinicSelected(regionHospitalList);
setState(() {}); setState(() {});
} else { } else {
@ -258,8 +230,7 @@ class _ResultByClinicState extends State<ResultByClinic> {
clinicIds = List.empty(); clinicIds = List.empty();
List<ListClinicCentralized> clinicId = []; List<ListClinicCentralized> clinicId = [];
try { try {
Map res = await service.getClinicByHospital( Map res = await service.getClinicByHospital(projectID: newValue?.mainProjectID.toString() ?? "");
projectID: newValue?.mainProjectID.toString() ?? "");
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
List list = res['ListClinic']; List list = res['ListClinic'];

@ -14,15 +14,16 @@ class ResultByDoctor extends StatefulWidget {
final bool isDoctorNameSearch; final bool isDoctorNameSearch;
final bool isDoctorSearchResult; final bool isDoctorSearchResult;
final OBGyneProcedureListResponse? obGyneProcedureListResponse; final OBGyneProcedureListResponse? obGyneProcedureListResponse;
ResultByDoctor(
{required this.doctorsList, ResultByDoctor({
required this.patientDoctorAppointmentListHospital, required this.doctorsList,
required this.isLiveCareAppointment, required this.patientDoctorAppointmentListHospital,
required this.isObGyneAppointment, required this.isLiveCareAppointment,
required this.isDoctorNameSearch, required this.isObGyneAppointment,
required this.isDoctorSearchResult, required this.isDoctorNameSearch,
this.obGyneProcedureListResponse, required this.isDoctorSearchResult,
}); this.obGyneProcedureListResponse,
});
@override @override
State<ResultByDoctor> createState() => _ResultByDoctorState(); State<ResultByDoctor> createState() => _ResultByDoctorState();
@ -47,28 +48,20 @@ class _ResultByDoctorState extends State<ResultByDoctor> {
); );
}, },
itemBuilder: (context, index) { itemBuilder: (context, index) {
final doctor = final doctor = widget.patientDoctorAppointmentListHospital![index];
widget.patientDoctorAppointmentListHospital![index];
return DoctorView( return DoctorView(
doctor: doctor, doctor: doctor,
isLiveCareAppointment: widget.isLiveCareAppointment, isLiveCareAppointment: widget.isLiveCareAppointment,
isObGyneAppointment: widget.isObGyneAppointment, isObGyneAppointment: widget.isObGyneAppointment,
isDoctorNameSearch: widget.isDoctorNameSearch, isDoctorNameSearch: widget.isDoctorNameSearch,
obGyneProcedureListResponse: obGyneProcedureListResponse: widget.obGyneProcedureListResponse,
widget.obGyneProcedureListResponse,
isShowDate: false, isShowDate: false,
onTap: () { onTap: () {
context context.read<ProjectViewModel>().analytics.appointment.book_appointment_select_doctor(appointment_type: 'regular', doctor: doctor);
.read<ProjectViewModel>() });
.analytics
.appointment
.book_appointment_select_doctor(
appointment_type: 'regular', doctor: doctor);
});
}, },
itemCount: itemCount: widget.patientDoctorAppointmentListHospital?.length ?? 0,
widget.patientDoctorAppointmentListHospital?.length ?? 0,
), ),
) )
: getNoDataWidget(context), : getNoDataWidget(context),

@ -154,7 +154,8 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
onTap: (index) { onTap: (index) {
setState(() { setState(() {
if (index == 1) { if (index == 1) {
if (widget.appo.clinicID == 17 || if (
// widget.appo.clinicID == 17 ||
widget.appo.clinicID == 47 || widget.appo.clinicID == 47 ||
widget.appo.clinicID == 23 || widget.appo.clinicID == 23 ||
widget.appo.clinicID == 253 || widget.appo.clinicID == 253 ||
@ -173,7 +174,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
}, },
tabs: [ tabs: [
Tab(child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))), 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 == 23 ||
widget.appo.clinicID == 47 || widget.appo.clinicID == 47 ||
widget.appo.clinicID == 265 || widget.appo.clinicID == 265 ||

@ -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/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.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/appoDetailsButtons.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.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/BookAppointment/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart';
@ -83,12 +85,11 @@ class _AppointmentActionsState extends State<AppointmentActions> {
shrinkWrap: true, shrinkWrap: true,
itemBuilder: (context, index) { 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.isLiveCareAppointment && appoButtonsList[index].caller == "askDoc") || appoButtonsList[index].caller == "openReschedule");
bool shouldEnable = bool shouldEnable = (((widget.appo.clinicID == 47 || widget.appo.clinicID == 134 || widget.appo.clinicID == 253) && appoButtonsList[index].caller == "openReschedule") ||
(((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") ||
(widget.appo.isLiveCareAppointment! && appoButtonsList[index].caller == "askDoc") || (Utils.isVidaPlusProject(projectViewModel, widget.appo.projectID) &&
(Utils.isVidaPlusProject(projectViewModel, widget.appo.projectID) && widget.appo.clinicID == 10 &&
widget.appo.clinicID == 10 && (appoButtonsList[index].caller == "prescriptions" || appoButtonsList[index].caller == "radiology" || appoButtonsList[index].caller == "labResult")));
(appoButtonsList[index].caller == "prescriptions" || appoButtonsList[index].caller == "radiology" || appoButtonsList[index].caller == "labResult")));
return InkWell( return InkWell(
onTap: shouldEnable onTap: shouldEnable
? null ? null

@ -23,7 +23,6 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_html/flutter_html.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:webview_flutter/webview_flutter.dart'; import 'package:webview_flutter/webview_flutter.dart';
class UserLoginAgreementPage extends StatefulWidget { class UserLoginAgreementPage extends StatefulWidget {
@ -45,7 +44,7 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
final authService = AuthProvider(); final authService = AuthProvider();
late final WebViewController _controller; late final WebViewController _controller;
bool isPageLoaded = true; bool isPageLoaded = false;
bool isTermsAndConditionsPage = true; bool isTermsAndConditionsPage = true;
bool acceptTerms = false; bool acceptTerms = false;
@ -53,31 +52,31 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
// _controller = WebViewController() _controller = WebViewController()
// ..setJavaScriptMode(JavaScriptMode.unrestricted) ..setJavaScriptMode(JavaScriptMode.unrestricted)
// ..setNavigationDelegate( ..setNavigationDelegate(
// NavigationDelegate( NavigationDelegate(
// onProgress: (int progress) { onProgress: (int progress) {
// // Update loading bar. // Update loading bar.
// print("Progress: $progress"); print("Progress: $progress");
// }, },
// onPageStarted: (String url) {}, onPageStarted: (String url) {},
// onPageFinished: (String url) { onPageFinished: (String url) {
// setState(() { setState(() {
// isPageLoaded = true; isPageLoaded = true;
// }); });
// }, },
// onHttpError: (HttpResponseError error) {}, onHttpError: (HttpResponseError error) {},
// onWebResourceError: (WebResourceError error) {}, onWebResourceError: (WebResourceError error) {},
// onNavigationRequest: (NavigationRequest request) { onNavigationRequest: (NavigationRequest request) {
// if (request.url.startsWith('https://www.youtube.com/')) { if (request.url.startsWith('https://www.youtube.com/')) {
// return NavigationDecision.prevent; return NavigationDecision.prevent;
// } }
// return NavigationDecision.navigate; return NavigationDecision.navigate;
// }, },
// ), ),
// ) )
// ..loadRequest(Uri.parse(widget.isArabic ? "https://hmg.com/ar/Pages/Privacy.aspx" : "https://hmg.com/en/Pages/Privacy.aspx")); ..loadRequest(Uri.parse(widget.isArabic ? "https://hmg.com/ar/Pages/MBTerms.aspx" : "https://hmg.com/en/Pages/MBTerms.aspx"));
} }
@override @override
@ -94,16 +93,17 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
body: body:
// isTermsAndConditionsPage // isTermsAndConditionsPage
// ? // ?
getTermsAndConditionsContent(), // getTermsAndConditionsContent(),
// : isPageLoaded // :
// ? WebViewWidget(controller: _controller) isPageLoaded
// : Container( ? WebViewWidget(controller: _controller)
// child: Center( : Container(
// child: GifLoaderContainer( child: Center(
// barrierDismissible: false, child: GifLoaderContainer(
// ), barrierDismissible: false,
// ), ),
// ), ),
),
// Padding( // Padding(
// padding: const EdgeInsets.all(8.0), // padding: const EdgeInsets.all(8.0),
// child: SingleChildScrollView(child: WebViewWidget(controller: _controller) // child: SingleChildScrollView(child: WebViewWidget(controller: _controller)
@ -142,6 +142,24 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
letterSpacing: -0.64, 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), SizedBox(height: 12),
Row( Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
@ -156,24 +174,22 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
child: CustomTextButton( child: CustomTextButton(
backgroundColor: CustomColors.green, backgroundColor: CustomColors.green,
elevation: 0, elevation: 0,
onPressed: onPressed: isPageLoaded
// isPageLoaded ? () {
// ? // if (isTermsAndConditionsPage) {
() { if (acceptTerms) {
// if (isTermsAndConditionsPage) { addUsageAgreement();
if (acceptTerms) { // setState(() {
addUsageAgreement(); // isTermsAndConditionsPage = false;
// setState(() { // });
// isTermsAndConditionsPage = false; } else {
// }); AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms);
} else { }
AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms); // } else {
} // addUsageAgreement();
// } else { // }
// addUsageAgreement(); }
// } : null,
},
// : null,
child: Text(TranslationBase.of(context).acceptLbl.toUpperCase(), child: Text(TranslationBase.of(context).acceptLbl.toUpperCase(),
style: TextStyle( style: TextStyle(
fontSize: 18.0, fontSize: 18.0,
@ -244,22 +260,23 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24),
), ),
mHeight(12.0), mHeight(12.0),
InkWell( // InkWell(
onTap: () async { // onTap: () async {
await launchUrl(Uri.parse(widget.isArabic ? "https://hmg.com/ar/Pages/Privacy.aspx" : "https://hmg.com/en/Pages/Privacy.aspx")); // 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, // child: Text(
style: TextStyle( // TranslationBase.of(context).clickPrivacyPolicy,
fontSize: 16, // style: TextStyle(
fontWeight: FontWeight.bold, // fontSize: 16,
fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), // fontWeight: FontWeight.bold,
color: Colors.blue, // fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
letterSpacing: -1.44, // color: Colors.blue,
height: 35 / 24, // letterSpacing: -1.44,
decoration: TextDecoration.underline), // height: 35 / 24,
), // decoration: TextDecoration.underline),
), // ),
// ),
mHeight(12.0), mHeight(12.0),
Text( Text(
TranslationBase.of(context).termsConditions4, TranslationBase.of(context).termsConditions4,

@ -79,7 +79,11 @@ class _SplashScreenState extends State<SplashScreen> {
projectProvider.setVidaPlusProjectList(_privilegeService.vidaPlusProjectListModel); projectProvider.setVidaPlusProjectList(_privilegeService.vidaPlusProjectListModel);
projectProvider.setHMCProjectList(_privilegeService.hMCProjectListModel); projectProvider.setHMCProjectList(_privilegeService.hMCProjectListModel);
projectProvider.setProjectsDetailList(_privilegeService.projectDetailListModel); 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 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"); AppSharedPreferences().setString(APP_LANGUAGE, projectProvider.isArabic ? "ar" : "en");
var themeNotifier = Provider.of<ThemeNotifier>(context, listen: false); var themeNotifier = Provider.of<ThemeNotifier>(context, listen: false);
themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins')); themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins'));

@ -1,7 +1,7 @@
name: diplomaticquarterapp name: diplomaticquarterapp
description: A new Flutter application. description: A new Flutter application.
version: 4.6.092+4050092 version: 4.6.093+4050093
environment: environment:
sdk: ">=3.0.0 <3.13.0" sdk: ">=3.0.0 <3.13.0"

Loading…
Cancel
Save