fix merge issues

merge-requests/224/merge
Mohammad Aljammal 5 years ago
parent aa89a05f1d
commit 7167d58ce2

@ -21,18 +21,29 @@ const GET_PROJECT = 'Services/Lists.svc/REST/GetProject';
///Geofencing ///Geofencing
const GET_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_GetAllPoints'; const GET_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_GetAllPoints';
const LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo'; const LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo';
//weather
const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo';
///Doctor ///Doctor
const GET_MY_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; const GET_MY_DOCTOR =
'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles'; const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles';
const GET_DOCTOR_RATING_NOTES =
'Services/Doctors.svc/REST/dr_GetNotesDoctorRating';
const GET_DOCTOR_RATING_DETAILS =
'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails';
const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating'; const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating';
///Prescriptions ///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; const GET_PRESCRIPTIONS_ALL_ORDERS =
const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail'; const GET_PRESCRIPTION_REPORT =
const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; 'Services/Patients.svc/REST/INP_GetPrescriptionReport';
const SEND_PRESCRIPTION_EMAIL =
'Services/Notifications.svc/REST/SendPrescriptionEmail';
const GET_PRESCRIPTION_REPORT_ENH =
'Services/Patients.svc/REST/GetPrescriptionReport_enh';
///Lab Order ///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';

@ -339,19 +339,7 @@ const Map localizedValues = {
"remove-family-member": {"en": "Remove this member?", "ar": "إزالة ملف العضو؟"}, "remove-family-member": {"en": "Remove this member?", "ar": "إزالة ملف العضو؟"},
"MyMedicalFile": {"en": "My Medical File", 'ar': 'ملف الطبي الالكتروني'}, "MyMedicalFile": {"en": "My Medical File", 'ar': 'ملف الطبي الالكتروني'},
"myMedicalFileSubTitle": {"en": "All your medical records", 'ar': 'جميع سجلاتك الطبية'}, "myMedicalFileSubTitle": {"en": "All your medical records", 'ar': 'جميع سجلاتك الطبية'},
"register-info-family": {
"en": "How would like to add the new member?",
"ar": "كيف ترغب باضافة العضو الجديد؟"
},
"remove-family-member": {
"en": "Remove this member?",
"ar": "إزالة ملف العضو؟"
},
"MyMedicalFile": {"en": "My Medical File", 'ar': 'ملف الطبي'},
"myMedicalFileSubTitle": {
"en": "All your medical records",
'ar': 'جميع سجلاتك الطبية'
},
"viewMore": {"en": "View More", 'ar': 'عرض المزيد'}, "viewMore": {"en": "View More", 'ar': 'عرض المزيد'},
"homeHealthCareService": {"en": "Home Health Care Service", 'ar': 'الرعاية الصحية المنزلية'}, "homeHealthCareService": {"en": "Home Health Care Service", 'ar': 'الرعاية الصحية المنزلية'},
"OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدليات الحبيب'}, "OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدليات الحبيب'},
@ -501,9 +489,6 @@ const Map localizedValues = {
"BalanceAmount": {"en": "Balance Amount", "ar": "رصيدالحساب"}, "BalanceAmount": {"en": "Balance Amount", "ar": "رصيدالحساب"},
"TotalBalance": {"en": "Total Balance", "ar": "الرصيد الكلي"}, "TotalBalance": {"en": "Total Balance", "ar": "الرصيد الكلي"},
"CreateAdvancedPayment": {"en": "Create Advanced Payment", "ar": "إنشاء دفعة مقدمة"}, "CreateAdvancedPayment": {"en": "Create Advanced Payment", "ar": "إنشاء دفعة مقدمة"},
"BalanceAmount": {"en": "Wallet Amount", "ar": "مبلغ المحفظة"},
"TotalBalance": {"en": "Total Amount", "ar": "المبلغ الإجمالي"},
"CreateAdvancedPayment": {"en": "Recharge Wallet", "ar": "إعادة شحن المحفظة"},
"AdvancePayment": {"en": "Advance Payment", "ar": "الدفع مقدما"}, "AdvancePayment": {"en": "Advance Payment", "ar": "الدفع مقدما"},
"AdvancePaymentLabel": {"en": "You can create and add an Advanced Payment for you account or other accounts.", "ar": "يمكنك تحويل مبلغ لحسابك لدى المجموعة أو لحساب احد المراجعين"}, "AdvancePaymentLabel": {"en": "You can create and add an Advanced Payment for you account or other accounts.", "ar": "يمكنك تحويل مبلغ لحسابك لدى المجموعة أو لحساب احد المراجعين"},
"FileNumber": {"en": "File Number", "ar": "رقم الملف"}, "FileNumber": {"en": "File Number", "ar": "رقم الملف"},

@ -151,13 +151,68 @@ class BaseAppClient {
onFailure('Please Check The Internet Connection', -1); onFailure('Please Check The Internet Connection', -1);
} }
} catch (e) { } catch (e) {
//print(e); print(e);
// onFailure(e.toString(), -1);
if (e is String) { }
onFailure(e.toString(), -1); }
get(String endPoint,
{Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure,
Map<String, String> queryParams}) async {
String url = BASE_URL + endPoint;
if (queryParams != null) {
String queryString = Uri(queryParameters: queryParams).query;
url += '?' + queryString;
}
print("URL : $url");
if (await Utils.checkConnection()) {
final response = await http.get(url.trim(), headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode);
} else {
var parsed = json.decode(response.body.toString());
onSuccess(parsed, statusCode);
}
} else {
onFailure('Please Check The Internet Connection', -1);
}
}
simpleGet(String fullUrl, {Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, Map<String, String> queryParams}) async {
String url = fullUrl;
var haveParams = (queryParams != null);
if (haveParams) {
String queryString = Uri(queryParameters: queryParams).query;
url += '?' + queryString;
print("URL Query String: $url");
}
if (await Utils.checkConnection()) {
final response = await http.get(
url.trim(),
headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode);
} else { } else {
onFailure('Failed to connect to the server', -1); onSuccess(response.body.toString(), statusCode);
} }
} else {
onFailure('Please Check The Internet Connection', -1);
} }
} }

@ -10,20 +10,20 @@ class OrderPreviewService extends BaseService{
List<Addresses> addresses = List(); List<Addresses> addresses = List();
Future getBannerListList() async { Future getBannerListList() async {
hasError = false; // hasError = false;
try { // try {
await baseAppClient.get(GET_CUSTOMERS_ADDRESSES, // await baseAppClient.get(GET_CUSTOMERS_ADDRESSES,
onSuccess: (dynamic response, int statusCode) { // onSuccess: (dynamic response, int statusCode) {
addresses.clear(); // addresses.clear();
response['customers'][0]['addresses'].forEach((item) { // response['customers'][0]['addresses'].forEach((item) {
addresses.add(Addresses.fromJson(item)); // addresses.add(Addresses.fromJson(item));
}); // });
}, onFailure: (String error, int statusCode) { // }, onFailure: (String error, int statusCode) {
hasError = true; // hasError = true;
super.error = error; // super.error = error;
}); // });
} catch (error) { // } catch (error) {
throw error; // throw error;
} // }
} }
} }

@ -18,16 +18,16 @@ class PharmacyModuleService extends BaseService {
Future getBannerListList() async { Future getBannerListList() async {
hasError = false; hasError = false;
try { try {
await baseAppClient.get(GET_PHARMACY_BANNER, // await baseAppClient.get(GET_PHARMACY_BANNER,
onSuccess: (dynamic response, int statusCode) { // onSuccess: (dynamic response, int statusCode) {
bannerItems.clear(); // bannerItems.clear();
response['images'].forEach((item) { // response['images'].forEach((item) {
bannerItems.add(PharmacyImageObject.fromJson(item)); // bannerItems.add(PharmacyImageObject.fromJson(item));
}); // });
}, onFailure: (String error, int statusCode) { // }, onFailure: (String error, int statusCode) {
hasError = true; // hasError = true;
super.error = error; // super.error = error;
}); // });
} catch (error) { } catch (error) {
throw error; throw error;
} }
@ -36,16 +36,16 @@ class PharmacyModuleService extends BaseService {
Future getTopManufacturerList() async { Future getTopManufacturerList() async {
Map<String, String> queryParams = {'page': '1', 'limit': '8'}; Map<String, String> queryParams = {'page': '1', 'limit': '8'};
try { try {
await baseAppClient.get(GET_PHARMACY_TOP_MANUFACTURER, // await baseAppClient.get(GET_PHARMACY_TOP_MANUFACTURER,
onSuccess: (dynamic response, int statusCode) { // onSuccess: (dynamic response, int statusCode) {
manufacturerList.clear(); // manufacturerList.clear();
response['manufacturer'].forEach((item) { // response['manufacturer'].forEach((item) {
manufacturerList.add(Manufacturer.fromJson(item)); // manufacturerList.add(Manufacturer.fromJson(item));
}); // });
}, onFailure: (String error, int statusCode) { // }, onFailure: (String error, int statusCode) {
hasError = true; // hasError = true;
super.error = error; // super.error = error;
}, queryParams: queryParams); // }, queryParams: queryParams);
} catch (error) { } catch (error) {
throw error; throw error;
} }
@ -57,16 +57,16 @@ class PharmacyModuleService extends BaseService {
'id,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage,reviews', 'id,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage,reviews',
}; };
try { try {
await baseAppClient.get(GET_PHARMACY_BEST_SELLER_PRODUCT, // await baseAppClient.get(GET_PHARMACY_BEST_SELLER_PRODUCT,
onSuccess: (dynamic response, int statusCode) { // onSuccess: (dynamic response, int statusCode) {
bestSellerProducts.clear(); // bestSellerProducts.clear();
response['products'].forEach((item) { // response['products'].forEach((item) {
bestSellerProducts.add(PharmacyProduct.fromJson(item)); // bestSellerProducts.add(PharmacyProduct.fromJson(item));
}); // });
}, onFailure: (String error, int statusCode) { // }, onFailure: (String error, int statusCode) {
hasError = true; // hasError = true;
super.error = error; // super.error = error;
}, queryParams: queryParams); // }, queryParams: queryParams);
} catch (error) { } catch (error) {
throw error; throw error;
} }
@ -79,16 +79,16 @@ class PharmacyModuleService extends BaseService {
lastVisited = lastVisited =
await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS); await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS);
try { try {
await baseAppClient.get("$GET_PHARMACY_PRODUCTs_BY_IDS$lastVisited", // await baseAppClient.get("$GET_PHARMACY_PRODUCTs_BY_IDS$lastVisited",
onSuccess: (dynamic response, int statusCode) { // onSuccess: (dynamic response, int statusCode) {
lastVisitedProducts.clear(); // lastVisitedProducts.clear();
response['products'].forEach((item) { // response['products'].forEach((item) {
lastVisitedProducts.add(PharmacyProduct.fromJson(item)); // lastVisitedProducts.add(PharmacyProduct.fromJson(item));
}); // });
}, onFailure: (String error, int statusCode) { // }, onFailure: (String error, int statusCode) {
hasError = true; // hasError = true;
super.error = error; // super.error = error;
}); // });
} catch (error) { } catch (error) {
throw error; throw error;
} }

@ -103,9 +103,9 @@ class PrescriptionsViewModel extends BaseViewModel {
notifyListeners(); notifyListeners();
} }
getPrescriptionReport({int dischargeNo,int projectId,int clinicID,String setupID,int episodeID}) async { getPrescriptionReport({Prescriptions prescriptions}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReport(dischargeNo: dischargeNo,projectId: projectId,clinicID: clinicID,setupID: setupID,episodeID: episodeID); await _prescriptionsService.getPrescriptionReport(prescriptions: prescriptions);
if (_prescriptionsService.hasError) { if (_prescriptionsService.hasError) {
error = _prescriptionsService.error; error = _prescriptionsService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -4,6 +4,7 @@ import 'package:connectivity/connectivity.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';

@ -0,0 +1,32 @@
class DoctorRateDetails {
dynamic doctorID;
dynamic projectID;
dynamic clinicID;
dynamic rate;
dynamic patientNumber;
DoctorRateDetails(
{this.doctorID,
this.projectID,
this.clinicID,
this.rate,
this.patientNumber});
DoctorRateDetails.fromJson(Map<String, dynamic> json) {
doctorID = json['DoctorID'];
projectID = json['ProjectID'];
clinicID = json['ClinicID'];
rate = json['Rate'];
patientNumber = json['PatientNumber'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['DoctorID'] = this.doctorID;
data['ProjectID'] = this.projectID;
data['ClinicID'] = this.clinicID;
data['Rate'] = this.rate;
data['PatientNumber'] = this.patientNumber;
return data;
}
}

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -10,6 +11,7 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
@ -18,7 +20,6 @@ import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'dialogs/ConfirmSMSDialog.dart'; import 'dialogs/ConfirmSMSDialog.dart';
import 'new_text_Field.dart'; import 'new_text_Field.dart';
@ -159,16 +160,16 @@ class ConfirmPaymentPage extends StatelessWidget {
label: TranslationBase.of(context).confirm.toUpperCase(), label: TranslationBase.of(context).confirm.toUpperCase(),
disabled: model.state == ViewState.Busy, disabled: model.state == ViewState.Busy,
onTap: () { onTap: () {
GifLoaderDialogUtils.showMyDialog(context);
model model
.sendActivationCodeForAdvancePayment( .sendActivationCodeForAdvancePayment(
patientID: int.parse(advanceModel.fileNumber), patientID: int.parse(advanceModel.fileNumber),
projectID: advanceModel.hospitalsModel.iD) projectID: advanceModel.hospitalsModel.iD)
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (model.state != ViewState.ErrorLocal && if (model.state != ViewState.ErrorLocal &&
model.state != ViewState.Error) showSMSDialog(); model.state != ViewState.Error) showSMSDialog();
}).showProgressBar( });
text: "Loading",
backgroundColor: Colors.blue.withOpacity(0.6));
}, },
), ),
), ),
@ -213,6 +214,9 @@ class ConfirmPaymentPage extends StatelessWidget {
appo.projectID.toString(), appo.projectID.toString(),
authenticatedUser.emailAddress, authenticatedUser.emailAddress,
paymentMethod, paymentMethod,
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser, authenticatedUser,
browser); browser);
} }
@ -245,12 +249,14 @@ class ConfirmPaymentPage extends StatelessWidget {
checkPaymentStatus(AppoitmentAllHistoryResultList appo) { checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service service
.checkPaymentStatus( .checkPaymentStatus(
Utils.getAppointmentTransID( Utils.getAppointmentTransID(
appo.projectID, appo.clinicID, appo.appointmentNo), appo.projectID, appo.clinicID, appo.appointmentNo),
AppGlobal.context) AppGlobal.context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print("Printing Payment Status Reponse!!!!"); print("Printing Payment Status Reponse!!!!");
print(res); print(res);
String paymentInfo = res['Response_Message']; String paymentInfo = res['Response_Message'];
@ -260,18 +266,21 @@ class ConfirmPaymentPage extends StatelessWidget {
AppToast.showErrorToast(message: res['Response_Message']); AppToast.showErrorToast(message: res['Response_Message']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString(); String paymentReference = res['Fort_id'].toString();
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service service
.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], .createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'],
res['PaymentMethod'], AppGlobal.context) res['PaymentMethod'], AppGlobal.context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
addAdvancedNumberRequest( addAdvancedNumberRequest(
res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
@ -279,24 +288,28 @@ class ConfirmPaymentPage extends StatelessWidget {
appo.appointmentNo.toString(), appo.appointmentNo.toString(),
appo); appo);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
addAdvancedNumberRequest(String advanceNumber, String paymentReference, addAdvancedNumberRequest(String advanceNumber, String paymentReference,
String appointmentID, AppoitmentAllHistoryResultList appo) { String appointmentID, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service service
.addAdvancedNumberRequest( .addAdvancedNumberRequest(
advanceNumber, paymentReference, appointmentID, AppGlobal.context) advanceNumber, paymentReference, appointmentID, AppGlobal.context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print(res); print(res);
navigateToHome(AppGlobal.context); navigateToHome(AppGlobal.context);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Future navigateToHome(context) async { Future navigateToHome(context) async {

@ -14,7 +14,6 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'QRCode.dart'; import 'QRCode.dart';
@ -454,36 +453,37 @@ class _BookSuccessState extends State<BookSuccess> {
confirmAppointment(AppoitmentAllHistoryResultList appo) { confirmAppointment(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID, .confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID,
appo.isLiveCareAppointment, context) appo.isLiveCareAppointment, context)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); if (res['MessageStatus'] == 1) {
} else { AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); if (appo.isLiveCareAppointment) {
} insertLiveCareVIDARequest(appo);
}) } else {
.catchError((err) { navigateToHome(context);
print(err); }
}) } else {
.showProgressBar( AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) }
.then((value) { }).catchError((err) {
if (appo.isLiveCareAppointment) { GifLoaderDialogUtils.hideDialog(context);
insertLiveCareVIDARequest(appo); AppToast.showErrorToast(message: err);
} else { print(err);
navigateToHome(context); });
}
});
} }
insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo) { insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, .insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID,
appo.serviceID, appo.doctorID, context) appo.serviceID, appo.doctorID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
navigateToHome(context); navigateToHome(context);
@ -491,9 +491,10 @@ class _BookSuccessState extends State<BookSuccess> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Widget _getPayNowAppo() { Widget _getPayNowAppo() {
@ -613,7 +614,7 @@ class _BookSuccessState extends State<BookSuccess> {
AppoitmentAllHistoryResultList appo) async { AppoitmentAllHistoryResultList appo) async {
if (paymentMethod == "ApplePay") { if (paymentMethod == "ApplePay") {
await widget.chromeBrowser.open( await widget.chromeBrowser.open(
url: "https://flutter.dev/", url: "https://applepay-datatrans-sample.herokuapp.com/",
options: ChromeSafariBrowserClassOptions( options: ChromeSafariBrowserClassOptions(
android: AndroidChromeCustomTabsOptions( android: AndroidChromeCustomTabsOptions(
addDefaultShareMenuItem: false), addDefaultShareMenuItem: false),
@ -632,6 +633,9 @@ class _BookSuccessState extends State<BookSuccess> {
appo.projectID.toString(), appo.projectID.toString(),
authenticatedUser.emailAddress, authenticatedUser.emailAddress,
paymentMethod, paymentMethod,
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser, authenticatedUser,
widget.browser); widget.browser);
} }
@ -689,6 +693,7 @@ class _BookSuccessState extends State<BookSuccess> {
} }
getApplePayAPQ(AppoitmentAllHistoryResultList appo) { getApplePayAPQ(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.checkPaymentStatus( .checkPaymentStatus(
@ -696,6 +701,7 @@ class _BookSuccessState extends State<BookSuccess> {
appo.projectID, appo.clinicID, appo.appointmentNo), appo.projectID, appo.clinicID, appo.appointmentNo),
context) context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
print("Printing Payment Status Reponse!!!!"); print("Printing Payment Status Reponse!!!!");
print(res); print(res);
String paymentInfo = res['Response_Message']; String paymentInfo = res['Response_Message'];
@ -705,9 +711,10 @@ class _BookSuccessState extends State<BookSuccess> {
AppToast.showErrorToast(message: res['Response_Message']); AppToast.showErrorToast(message: res['Response_Message']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {

@ -125,10 +125,9 @@ class _ApointmentCardState extends State<AppointmentCard> {
widget.appo.patientStatusType == widget.appo.patientStatusType ==
AppointmentType.CONFIRMED) AppointmentType.CONFIRMED)
? Container( ? Container(
//TODO fix it remove couz merge
child: CountdownTimer( child: CountdownTimer(
endTime: DateTime.now().millisecondsSinceEpoch + // endTime: DateTime.now().millisecondsSinceEpoch + (widget.appo.remaniningHoursTocanPay * 1000) * 60,
(widget.appo.remaniningHoursTocanPay * 1000) *
60,
widgetBuilder: (_, CurrentRemainingTime time) { widgetBuilder: (_, CurrentRemainingTime time) {
return Text( return Text(
'${time.days}:${time.hours}:${time.min}:${time.sec} ' + '${time.days}:${time.hours}:${time.min}:${time.sec} ' +

@ -228,13 +228,9 @@ class _ToDoState extends State<ToDo> {
], ],
), ),
Container( Container(
//TODO fix it removed by Mohammad Aljammal
child: CountdownTimer( child: CountdownTimer(
endTime: DateTime.now() //endTime: DateTime.now().millisecondsSinceEpoch + (widget.appoList[index].remaniningHoursTocanPay * 1000) * 60,
.millisecondsSinceEpoch +
(widget.appoList[index]
.remaniningHoursTocanPay *
1000) *
60,
widgetBuilder: widgetBuilder:
(_, CurrentRemainingTime time) { (_, CurrentRemainingTime time) {
return Text( return Text(

@ -1,10 +1,12 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/model/geofencing/requests/GeoZonesRequestModel.dart'; import 'package:diplomaticquarterapp/core/model/geofencing/requests/GeoZonesRequestModel.dart';
import 'package:diplomaticquarterapp/core/model/geofencing/requests/LogGeoZoneRequestModel.dart'; import 'package:diplomaticquarterapp/core/model/geofencing/requests/LogGeoZoneRequestModel.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/geofencing/GeofencingServices.dart'; import 'package:diplomaticquarterapp/core/service/geofencing/GeofencingServices.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
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/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_index_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_index_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';

@ -3,9 +3,7 @@ import 'dart:typed_data';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/geofencing/requests/GeoZonesRequestModel.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/geofencing/GeofencingServices.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
@ -18,11 +16,7 @@ import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart';
import 'package:diplomaticquarterapp/uitl/HMGNetworkConnectivity.dart';
import 'package:diplomaticquarterapp/uitl/HMG_Geofence.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart'; import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart';
@ -35,7 +29,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import '../../locator.dart'; import '../../locator.dart';
import '../../routes.dart'; import '../../routes.dart';
import 'home_page.dart'; import 'home_page.dart';
@ -52,9 +46,8 @@ class LandingPage extends StatefulWidget {
class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver { class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
int currentTab = 0; int currentTab = 0;
PageController pageController; PageController pageController;
ProjectViewModel projectViewModel; ProjectViewModel projectProvider;
var notificationCount = ''; var notificationCount = '';
var themeNotifier;
///inject the user data ///inject the user data
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject =
@ -76,7 +69,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
} }
bool isPageNavigated = false; bool isPageNavigated = false;
LocationUtils locationUtils;
_changeCurrentTab(int tab) { _changeCurrentTab(int tab) {
setState(() { setState(() {
currentTab = tab; currentTab = tab;
@ -98,7 +91,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
print("didChangeAppLifecycleState"); print("didChangeAppLifecycleState");
print('state = $state'); print('state = $state');
AppGlobal.context = context; AppGlobal.context = context;
if (state == AppLifecycleState.resumed) { if (state == AppLifecycleState.resumed) {
print(LandingPage.isOpenCallPage); print(LandingPage.isOpenCallPage);
if (LandingPage.isOpenCallPage) { if (LandingPage.isOpenCallPage) {
@ -135,7 +127,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);
//setState(() { //setState(() {
AppGlobal.context = context; AppGlobal.context = context;
@ -144,172 +135,136 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
pageController = PageController(keepPage: true); pageController = PageController(keepPage: true);
_firebaseMessaging.setAutoInitEnabled(true); _firebaseMessaging.setAutoInitEnabled(true);
// HMG (Guest/Internet) Wifi Access [Zohaib Kambrani]
HMGNetworkConnectivity(context, () {
GifLoaderDialogUtils.showMyDialog(context);
PlatformBridge().connectHMGGuestWifi().then((value) => {GifLoaderDialogUtils.hideDialog(context)});
}).checkAndConnectIfNoInternet();
if (Platform.isIOS) { if (Platform.isIOS) {
_firebaseMessaging.requestNotificationPermissions(); _firebaseMessaging.requestNotificationPermissions();
} }
// Flip Permission Checks [Zohaib Kambrani] _firebaseMessaging.getToken().then((String token) {
requestPermissions().then((results) {
if (results[Permission.locationAlways].isGranted || results[Permission.location].isGranted) {
debugPrint("Fetching GEO ZONES from HMG service...");
locator<GeofencingServices>().getAllGeoZones(GeoZonesRequestModel()).then((geoZones) {
debugPrint("GEO ZONES saved to AppPreferences with key '$HMG_GEOFENCES'");
debugPrint("Finished Fetching GEO ZONES from HMG service...");
projectViewModel.platformBridge().registerHmgGeofences();
});
}
if (results[Permission.notification].isGranted)
_firebaseMessaging.getToken().then((String token) {
sharedPref.setString(PUSH_TOKEN, token);
if (token != null && DEVICE_TOKEN == "") {
DEVICE_TOKEN = token;
checkUserStatus(token);
}
});
if (results[Permission.storage].isGranted) ;
if (results[Permission.camera].isGranted) ;
if (results[Permission.photos].isGranted) ;
if (results[Permission.accessMediaLocation].isGranted) ;
if (results[Permission.calendar].isGranted) ;
_firebaseMessaging.getToken().then((String token) async {
sharedPref.setString(PUSH_TOKEN, token); sharedPref.setString(PUSH_TOKEN, token);
if (token != null && DEVICE_TOKEN == "") {
if (token != null && await sharedPref.getObject(USER_PROFILE) == null) {
DEVICE_TOKEN = token; DEVICE_TOKEN = token;
checkUserStatus(token); checkUserStatus(token);
} else if (projectViewModel.isLogin) {
getNotificationCount(token);
} }
requestPermissions();
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}); });
requestPermissions();
// });
// //
// //_firebase Background message handler // //_firebase Background message handler
Future.delayed(Duration.zero, () => setTheme());
//_firebase Background message handler
// _firebaseMessaging.configure( // _firebaseMessaging.configure(
// onMessage: (Map<String, dynamic> message) async { // // onMessage: (Map<String, dynamic> message) async {
// showDialog("onMessage: $message"); // // showDialog("onMessage: $message");
// print("onMessage: $message"); // // print("onMessage: $message");
// print(message); // // print(message);
// print(message['name']); // // print(message['name']);
// print(message['appointmentdate']); // // print(message['appointmentdate']);
// // //
// if (Platform.isIOS) { // // if (Platform.isIOS) {
// if (message['is_call'] == "true") { // // if (message['is_call'] == "true") {
// var route = ModalRoute.of(context); // // var route = ModalRoute.of(context);
// // //
// if (route != null) { // // if (route != null) {
// print(route.settings.name); // // print(route.settings.name);
// } // // }
// // //
// Map<String, dynamic> myMap = new Map<String, dynamic>.from(message); // // Map<String, dynamic> myMap = new Map<String, dynamic>.from(message);
// print(myMap); // // print(myMap);
// LandingPage.isOpenCallPage = true; // // LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) { // // if (!isPageNavigated) {
// isPageNavigated = true; // // isPageNavigated = true;
// Navigator.push( // // Navigator.push(
// context, // // context,
// MaterialPageRoute( // // MaterialPageRoute(
// builder: (context) => IncomingCall( // // builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData))) // // incomingCallData: LandingPage.incomingCallData)))
// .then((value) { // // .then((value) {
// isPageNavigated = false; // // isPageNavigated = false;
// }); // // });
// } // // }
// } else { // // } else {
// print("Is Call Not Found iOS"); // // print("Is Call Not Found iOS");
// } // // }
// } else { // // } else {
// print("Is Call Not Found iOS"); // // print("Is Call Not Found iOS");
// } // // }
// // //
// if (Platform.isAndroid) { // // if (Platform.isAndroid) {
// if (message['data'].containsKey("is_call")) { // // if (message['data'].containsKey("is_call")) {
// var route = ModalRoute.of(context); // // var route = ModalRoute.of(context);
// // //
// if (route != null) { // // if (route != null) {
// print(route.settings.name); // // print(route.settings.name);
// } // // }
// // //
// Map<String, dynamic> myMap = // // Map<String, dynamic> myMap =
// new Map<String, dynamic>.from(message['data']); // // new Map<String, dynamic>.from(message['data']);
// print(myMap); // // print(myMap);
// LandingPage.isOpenCallPage = true; // // LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) { // // if (!isPageNavigated) {
// isPageNavigated = true; // // isPageNavigated = true;
// Navigator.push( // // Navigator.push(
// context, // // context,
// MaterialPageRoute( // // MaterialPageRoute(
// builder: (context) => IncomingCall( // // builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData))) // // incomingCallData: LandingPage.incomingCallData)))
// .then((value) { // // .then((value) {
// isPageNavigated = false; // // isPageNavigated = false;
// }); // // });
// } // // }
// } else { // // } else {
// print("Is Call Not Found Android"); // // print("Is Call Not Found Android");
// } // // }
// } else { // // } else {
// print("Is Call Not Found Android"); // // print("Is Call Not Found Android");
// } // // }
// }, // // },
// onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler, // // onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler,
// onLaunch: (Map<String, dynamic> message) async { // // onLaunch: (Map<String, dynamic> message) async {
// print("onLaunch: $message"); // // print("onLaunch: $message");
// showDialog("onLaunch: $message"); // // showDialog("onLaunch: $message");
// }, // // },
// onResume: (Map<String, dynamic> message) async { // // onResume: (Map<String, dynamic> message) async {
// print("onResume: $message"); // // print("onResume: $message");
// print(message); // // print(message);
// print(message['name']); // // print(message['name']);
// print(message['appointmentdate']); // // print(message['appointmentdate']);
// // //
// showDialog("onResume: $message"); // // showDialog("onResume: $message");
// // //
// if (Platform.isIOS) { // // if (Platform.isIOS) {
// if (message['is_call'] == "true") { // // if (message['is_call'] == "true") {
// var route = ModalRoute.of(context); // // var route = ModalRoute.of(context);
// // //
// if (route != null) { // // if (route != null) {
// print(route.settings.name); // // print(route.settings.name);
// } // // }
// // //
// Map<String, dynamic> myMap = // // Map<String, dynamic> myMap =
// new Map<String, dynamic>.from(message); // // new Map<String, dynamic>.from(message);
// print(myMap); // // print(myMap);
// LandingPage.isOpenCallPage = true; // // LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) { // // if (!isPageNavigated) {
// isPageNavigated = true; // // isPageNavigated = true;
// Navigator.push( // // Navigator.push(
// context, // // context,
// MaterialPageRoute( // // MaterialPageRoute(
// builder: (context) => IncomingCall( // // builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData))) // // incomingCallData: LandingPage.incomingCallData)))
// .then((value) { // // .then((value) {
// isPageNavigated = false; // // isPageNavigated = false;
// }); // // });
// } // // }
// } else { // // } else {
// print("Is Call Not Found iOS"); // // print("Is Call Not Found iOS");
// } // // }
// } else { // // } else {
// print("Is Call Not Found iOS"); // // print("Is Call Not Found iOS");
// } // // }
// }, // // },
// ); // );
} }
showDialogs(String message) { showDialogs(String message) {
@ -379,9 +334,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context); ProjectViewModel projectViewModel = Provider.of(context);
themeNotifier = Provider.of<ThemeNotifier>(context);
//setTheme();
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
elevation: 0, elevation: 0,
@ -425,7 +379,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
notificationCount, notificationCount,
style: new TextStyle( style: new TextStyle(
color: Colors.white, color: Colors.white,
fontSize: projectViewModel.isArabic ? 8 : 9, fontSize: projectViewModel.isArabic ? 8 : 9,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@ -449,7 +403,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
SETTINGS, SETTINGS,
); );
else else
login(); Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
}, //do something, }, //do something,
) )
], ],
@ -469,7 +425,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
MedicalProfilePage(), MedicalProfilePage(),
BookingOptions(), BookingOptions(),
MyFamily(isAppbarVisible: false), MyFamily(isAppbarVisible: false),
ToDo(isShowAppBar: false), ToDo(),
], // Please do not remove the BookingOptions from this array ], // Please do not remove the BookingOptions from this array
), ),
bottomNavigationBar: BottomNavBar( bottomNavigationBar: BottomNavBar(
@ -504,14 +460,26 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
return TranslationBase.of(context).bookAppo; return TranslationBase.of(context).bookAppo;
} }
} }
void checkUserStatus(token) async { void checkUserStatus(token) async {
//GifLoaderDialogUtils.showMyDialog(context);
authService authService
.selectDeviceImei(token) .selectDeviceImei(token)
.then((SelectDeviceIMEIRES value) => setUserValues(value)) .then((SelectDeviceIMEIRES value) => setUserValues(value));
.catchError((err) { if (await sharedPref.getObject(USER_PROFILE) != null) {
//GifLoaderDialogUtils.hideDialog(context); var data =
}); AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) {
authService
.registeredAuthenticatedUser(data, token, 0, 0)
.then((res) => {print(res)});
authService.getDashboard().then((value) => {
setState(() {
notificationCount = value['List_PatientDashboard']
[0]['UnreadPatientNotificationCount'].toString();
})
});
}
}
} }
static Future<dynamic> myBackgroundMessageHandler( static Future<dynamic> myBackgroundMessageHandler(
@ -531,8 +499,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
} }
void setUserValues(value) async { void setUserValues(value) async {
//GifLoaderDialogUtils.hideDialog(context);
sharedPref.setObject(IMEI_USER_DATA, value); sharedPref.setObject(IMEI_USER_DATA, value);
} }
@ -541,36 +507,4 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_changeCurrentTab(2); _changeCurrentTab(2);
} }
} }
login() async {
var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);
if (data != null) {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
}
}
getNotificationCount(token) async {
if (await sharedPref.getObject(USER_PROFILE) != null) {
var data =
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) {
authService
.registeredAuthenticatedUser(data, token, 0, 0)
.then((res) => {print(res)});
authService.getDashboard().then((value) => {
setState(() {
notificationCount = value['List_PatientDashboard'][0]
['UnreadPatientNotificationCount']
.toString();
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
})
});
}
}
}
} }

@ -17,13 +17,13 @@ import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class ClinicList extends StatefulWidget { class ClinicList extends StatefulWidget {
final Function getLiveCareHistory; final Function getLiveCareHistory;
@ -79,31 +79,27 @@ class _clinic_listState extends State<ClinicList> {
void startLiveCare() { void startLiveCare() {
bool isError = false; bool isError = false;
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
ERAppointmentFeesResponse erAppointmentFeesResponse = ERAppointmentFeesResponse erAppointmentFeesResponse =
new ERAppointmentFeesResponse(); new ERAppointmentFeesResponse();
service service.getERAppointmentFees(selectedClinicID, context).then((res) {
.getERAppointmentFees(selectedClinicID, context) GifLoaderDialogUtils.hideDialog(context);
.then((res) { if (res['HasAppointment'] == true) {
if (res['HasAppointment'] == true) { isError = true;
isError = true; showLiveCareCancelDialog(res['ErrorEndUserMessage'], res);
showLiveCareCancelDialog(res['ErrorEndUserMessage'], res); } else {
} else { erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res);
erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res); isError = false;
isError = false; }
} if (!isError)
}) getERAppointmentTime(
.catchError((err) { erAppointmentFeesResponse.getERAppointmentFeesList);
print(err); }).catchError((err) {
isError = true; GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); print(err);
}) isError = true;
.showProgressBar( AppToast.showErrorToast(message: err);
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) });
.then((value) {
if (!isError)
getERAppointmentTime(
erAppointmentFeesResponse.getERAppointmentFeesList);
});
} }
showLiveCareCancelDialog(String msg, res) { showLiveCareCancelDialog(String msg, res) {
@ -112,8 +108,7 @@ class _clinic_listState extends State<ClinicList> {
confirmMessage: msg, confirmMessage: msg,
okText: TranslationBase.of(context).confirm, okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps, cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => okFunction: () => {cancelAppointment(res)},
{cancelAppointment(res)},
cancelFunction: () => {}); cancelFunction: () => {});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
} }
@ -132,38 +127,37 @@ class _clinic_listState extends State<ClinicList> {
appo.appointmentDate = res['AppointmentDate']; appo.appointmentDate = res['AppointmentDate'];
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service.cancelAppointment(appo, context).then((res) {
.cancelAppointment(appo, context) GifLoaderDialogUtils.hideDialog(context);
.then((res) { print(res);
print(res); if (res['MessageStatus'] == 1) {
if (res['MessageStatus'] == 1) { AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); startLiveCare();
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}) }).catchError((err) {
.catchError((err) { GifLoaderDialogUtils.hideDialog(context);
print(err); AppToast.showErrorToast(message: err);
}) print(err);
.showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
startLiveCare();
});
} }
getERAppointmentTime(GetERAppointmentFeesList getERAppointmentFeesList) { getERAppointmentTime(GetERAppointmentFeesList getERAppointmentFeesList) {
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service.getERAppointmentTime(selectedClinicID, context).then((res) { service.getERAppointmentTime(selectedClinicID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res); print(res);
showLiveCarePaymentDialog( showLiveCarePaymentDialog(
getERAppointmentFeesList, res['WatingtimeInteger']); getERAppointmentFeesList, res['WatingtimeInteger']);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
showLiveCarePaymentDialog( showLiveCarePaymentDialog(
@ -285,6 +279,9 @@ class _clinic_listState extends State<ClinicList> {
"12", "12",
authenticatedUser.emailAddress, authenticatedUser.emailAddress,
paymentMethod, paymentMethod,
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser, authenticatedUser,
browser); browser);
} }
@ -317,12 +314,14 @@ class _clinic_listState extends State<ClinicList> {
checkPaymentStatus(AppoitmentAllHistoryResultList appo) { checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.checkPaymentStatus( .checkPaymentStatus(
Utils.getAppointmentTransID( Utils.getAppointmentTransID(
appo.projectID, appo.clinicID, appo.appointmentNo), appo.projectID, appo.clinicID, appo.appointmentNo),
context) context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
print("Printing Payment Status Reponse!!!!"); print("Printing Payment Status Reponse!!!!");
print(res); print(res);
String paymentInfo = res['Response_Message']; String paymentInfo = res['Response_Message'];
@ -333,27 +332,27 @@ class _clinic_listState extends State<ClinicList> {
AppToast.showErrorToast(message: res['Response_Message']); AppToast.showErrorToast(message: res['Response_Message']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
addNewCallForPatientER(String clientRequestID) { addNewCallForPatientER(String clientRequestID) {
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.addNewCallForPatientER(selectedClinicID, clientRequestID, context) .addNewCallForPatientER(selectedClinicID, clientRequestID, context)
.then((res) { .then((res) {
AppToast.showSuccessToast( GifLoaderDialogUtils.hideDialog(context);
message: "New Call has been added successfully"); AppToast.showSuccessToast(
}) message: "New Call has been added successfully");
.catchError((err) { widget.getLiveCareHistory();
print(err); }).catchError((err) {
}) GifLoaderDialogUtils.hideDialog(context);
.showProgressBar( AppToast.showErrorToast(message: err);
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) print(err);
.then((value) { });
widget.getLiveCareHistory();
});
} }
getLanguageID() async { getLanguageID() async {
@ -363,7 +362,9 @@ class _clinic_listState extends State<ClinicList> {
getLiveCareClinicsList() { getLiveCareClinicsList() {
isDataLoaded = false; isDataLoaded = false;
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service.getLivecareClinics(context).then((res) { service.getLivecareClinics(context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['PatientER_GetClinicsList'].length); print(res['PatientER_GetClinicsList'].length);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
@ -381,15 +382,18 @@ class _clinic_listState extends State<ClinicList> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
getLiveCareScheduleClinicsList() { getLiveCareScheduleClinicsList() {
isDataLoaded = false; isDataLoaded = false;
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service.getLiveCareScheduledClinics(context).then((res) { service.getLiveCareScheduledClinics(context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['ClinicsHaveScheduleList'].length); print(res['ClinicsHaveScheduleList'].length);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
@ -408,9 +412,10 @@ class _clinic_listState extends State<ClinicList> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
openLiveCareSelectionDialog() { openLiveCareSelectionDialog() {
@ -602,13 +607,13 @@ class _clinic_listState extends State<ClinicList> {
void startScheduleLiveCare() { void startScheduleLiveCare() {
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
List(); List();
service service
.getLiveCareScheduledDoctorList(context, selectedClinicID) .getLiveCareScheduledDoctorList(context, selectedClinicID)
.then((res) { .then((res) {
print(res['DoctorByClinicIDList']); GifLoaderDialogUtils.hideDialog(context);
print(res['DoctorByClinicIDList'].length);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
if (res['DoctorByClinicIDList'].length != 0) { if (res['DoctorByClinicIDList'].length != 0) {
@ -647,9 +652,10 @@ class _clinic_listState extends State<ClinicList> {
context, doctorsList, _patientDoctorAppointmentListHospital); context, doctorsList, _patientDoctorAppointmentListHospital);
} else {} } else {}
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Future navigateToSearchResults( Future navigateToSearchResults(

@ -19,7 +19,6 @@ import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'dialogs/ConfirmSMSDialog.dart'; import 'dialogs/ConfirmSMSDialog.dart';
import 'new_text_Field.dart'; import 'new_text_Field.dart';
@ -137,7 +136,11 @@ class ConfirmPaymentPage extends StatelessWidget {
), ),
NewTextFields( NewTextFields(
hintText: TranslationBase.of(context).depositorName, hintText: TranslationBase.of(context).depositorName,
initialValue: advanceModel.depositorName, initialValue: model.user.firstName +
" " +
model.user.middleName +
" " +
model.user.lastName,
isEnabled: false, isEnabled: false,
), ),
SizedBox( SizedBox(
@ -161,16 +164,16 @@ class ConfirmPaymentPage extends StatelessWidget {
label: TranslationBase.of(context).confirm.toUpperCase(), label: TranslationBase.of(context).confirm.toUpperCase(),
disabled: model.state == ViewState.Busy, disabled: model.state == ViewState.Busy,
onTap: () { onTap: () {
GifLoaderDialogUtils.showMyDialog(context);
model model
.sendActivationCodeForAdvancePayment( .sendActivationCodeForAdvancePayment(
patientID: int.parse(advanceModel.fileNumber), patientID: int.parse(advanceModel.fileNumber),
projectID: advanceModel.hospitalsModel.iD) projectID: advanceModel.hospitalsModel.iD)
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (model.state != ViewState.ErrorLocal && if (model.state != ViewState.ErrorLocal &&
model.state != ViewState.Error) showSMSDialog(); model.state != ViewState.Error) showSMSDialog();
}).showProgressBar( });
text: "Loading",
backgroundColor: Colors.blue.withOpacity(0.6));
}, },
), ),
), ),
@ -217,6 +220,9 @@ class ConfirmPaymentPage extends StatelessWidget {
advanceModel.hospitalsModel.iD.toString(), advanceModel.hospitalsModel.iD.toString(),
advanceModel.email, advanceModel.email,
paymentMethod, paymentMethod,
patientInfoAndMobileNumber.patientType,
advanceModel.patientName,
advanceModel.fileNumber,
authenticatedUser, authenticatedUser,
browser); browser);
} }
@ -276,6 +282,9 @@ class ConfirmPaymentPage extends StatelessWidget {
res['Amount'], res['Amount'],
res['Fort_id'], res['Fort_id'],
res['PaymentMethod'], res['PaymentMethod'],
patientInfoAndMobileNumber.patientType,
advanceModel.patientName,
advanceModel.fileNumber,
AppGlobal.context) AppGlobal.context)
.then((res) { .then((res) {
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_model.dart';

@ -177,6 +177,72 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getDoctorsRating(
int docID, context) async {
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authUser.outSA,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": null,
"doctorID": docID,
"PatientID": 0,
"License": true,
"IsRegistered": true,
"isDentalAllowedBackend": false
};
dynamic localRes;
await baseAppClient.post(GET_DOCTOR_RATING_NOTES,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getDoctorsRatingDetails(
int docID, context) async {
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authUser.outSA,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": null,
"DoctorID": docID,
"PatientID": 0,
"License": true,
"IsRegistered": true,
"isDentalAllowedBackend": false
};
dynamic localRes;
await baseAppClient.post(GET_DOCTOR_RATING_DETAILS,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getDoctorFreeSlots( Future<Map> getDoctorFreeSlots(
int docID, int clinicID, int projectID, BuildContext context) async { int docID, int clinicID, int projectID, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
@ -1206,6 +1272,9 @@ class DoctorsListService extends BaseService {
double payedAmount, double payedAmount,
String paymentReference, String paymentReference,
String paymentMethodName, String paymentMethodName,
dynamic patientType,
String patientName,
dynamic patientID,
BuildContext context) async { BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -1217,12 +1286,12 @@ class DoctorsListService extends BaseService {
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"CustName": authUser.firstName + " " + authUser.lastName, "CustName": patientName,
"CustID": authUser.patientID, "CustID": patientID,
"SetupID": "010266", "SetupID": "010266",
"ProjectID": projectID, "ProjectID": projectID,
"PatientID": authUser.patientID, "PatientID": patientID,
"AccountID": authUser.patientID, "AccountID": patientID,
"PaymentAmount": payedAmount, "PaymentAmount": payedAmount,
"NationalityID": null, "NationalityID": null,
"DepositorName": authUser.firstName + " " + authUser.lastName, "DepositorName": authUser.firstName + " " + authUser.lastName,
@ -1239,8 +1308,8 @@ class DoctorsListService extends BaseService {
"SessionID": "YckwoXhUmWBsnHKEKig", "SessionID": "YckwoXhUmWBsnHKEKig",
"isDentalAllowedBackend": false, "isDentalAllowedBackend": false,
"TokenID": "@dm!n", "TokenID": "@dm!n",
"PatientTypeID": authUser.patientType, "PatientTypeID": patientType,
"PatientType": authUser.patientType "PatientType": patientType
}; };
dynamic localRes; dynamic localRes;
await baseAppClient.post(HIS_CREATE_ADVANCE_PAYMENT, await baseAppClient.post(HIS_CREATE_ADVANCE_PAYMENT,

@ -37,6 +37,10 @@ const String SENT_REQUEST_URL =
'Services/Authentication.svc/REST/GetAllSharedRecordsByStatus'; 'Services/Authentication.svc/REST/GetAllSharedRecordsByStatus';
const String RECEVIED_REQUEST_URL = const String RECEVIED_REQUEST_URL =
'Services/Authentication.svc/REST/GetAllPendingRecordsByResponseId'; 'Services/Authentication.svc/REST/GetAllPendingRecordsByResponseId';
const ACCEPT_REJECT_FAMILY =
'Services/Authentication.svc/REST/Update_FileStatus';
const DEACTIVATE_FAMILY =
'Services/Authentication.svc/REST/DeactivateRequestByRensponse';
class FamilyFilesProvider with ChangeNotifier { class FamilyFilesProvider with ChangeNotifier {
bool isLogin = false; bool isLogin = false;
@ -47,7 +51,9 @@ class FamilyFilesProvider with ChangeNotifier {
try { try {
dynamic localRes; dynamic localRes;
var request = GetAllSharedRecordsByStatusReq(); var request = GetAllSharedRecordsByStatusReq();
var result = await sharedPref.getObject(MAIN_USER);
request.status = 0; request.status = 0;
request.patientID = result["PatientID"];
await new BaseAppClient().post(GET_SHARED_RECORD_BY_STATUS, await new BaseAppClient().post(GET_SHARED_RECORD_BY_STATUS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
@ -78,7 +84,7 @@ class FamilyFilesProvider with ChangeNotifier {
return Future.error(error); return Future.error(error);
}, body: request); }, body: request);
if (localRes != null) { if (localRes != null) {
sharedPref.setObject(FAMILY_FILE, localRes); // sharedPref.setObject(FAMILY_FILE, localRes);
allSharedRecordsByStatusResponse = allSharedRecordsByStatusResponse =
GetAllSharedRecordsByStatusResponse.fromJson(localRes); GetAllSharedRecordsByStatusResponse.fromJson(localRes);
return Future.value(allSharedRecordsByStatusResponse); return Future.value(allSharedRecordsByStatusResponse);
@ -103,7 +109,7 @@ class FamilyFilesProvider with ChangeNotifier {
//AppToast.showErrorToast(message: error); //AppToast.showErrorToast(message: error);
//throw error; //throw error;
}, body: request); }, body: request);
sharedPref.setObject(FAMILY_FILE, localRes); //sharedPref.setObject(FAMILY_FILE, localRes);
return Future.value( return Future.value(
GetAllSharedRecordsByStatusResponse.fromJson(localRes)); GetAllSharedRecordsByStatusResponse.fromJson(localRes));
} catch (error) { } catch (error) {
@ -249,9 +255,9 @@ class FamilyFilesProvider with ChangeNotifier {
Future<dynamic> silentLoggin(GetAllSharedRecordsByStatusList switchUser, Future<dynamic> silentLoggin(GetAllSharedRecordsByStatusList switchUser,
{onSuccess, mainUser}) async { {onSuccess, mainUser}) async {
Map<String, dynamic> request = {}; Map<String, dynamic> request = {};
if(mainUser ==true){ if (mainUser == true) {
var currentUser = var currentUser =
AuthenticatedUser.fromJson(await sharedPref.getObject(MAIN_USER)); AuthenticatedUser.fromJson(await sharedPref.getObject(MAIN_USER));
//const request = new SwitchUserRequest(); //const request = new SwitchUserRequest();
request['LogInTokenID'] = ''; request['LogInTokenID'] = '';
request['PatientOutSA'] = currentUser.outSA; //? 1 : 0; request['PatientOutSA'] = currentUser.outSA; //? 1 : 0;
@ -265,9 +271,9 @@ class FamilyFilesProvider with ChangeNotifier {
request['ZipCode'] = currentUser.outSA == 1 ? "971" : "966"; request['ZipCode'] = currentUser.outSA == 1 ? "971" : "966";
request['activationCode'] = '0000'; request['activationCode'] = '0000';
request['isRegister'] = false; request['isRegister'] = false;
}else { } else {
var currentUser = var currentUser =
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
//const request = new SwitchUserRequest(); //const request = new SwitchUserRequest();
request['LogInTokenID'] = ''; request['LogInTokenID'] = '';
@ -300,4 +306,42 @@ class FamilyFilesProvider with ChangeNotifier {
throw error; throw error;
} }
} }
Future<dynamic> acceptRejectFamily(request) async {
try {
dynamic localRes;
await new BaseAppClient().post(ACCEPT_REJECT_FAMILY,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
AppToast.showErrorToast(message: error);
throw error;
}, body: request);
return Future.value(localRes);
} catch (error) {
print(error);
throw error;
}
}
Future<dynamic> deactivateFamily(request) async {
try {
dynamic localRes;
await new BaseAppClient().post(DEACTIVATE_FAMILY,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
AppToast.showErrorToast(message: error);
throw error;
}, body: request);
return Future.value(localRes);
} catch (error) {
print(error);
throw error;
}
}
} }

@ -8,7 +8,8 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:localstorage/localstorage.dart'; import 'package:localstorage/localstorage.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:vibration/vibration.dart';
class PermissionService extends BaseService { class PermissionService extends BaseService {
final LocalStorage storage = new LocalStorage("permission"); final LocalStorage storage = new LocalStorage("permission");
@ -19,11 +20,19 @@ class PermissionService extends BaseService {
} }
isVibrationEnabled() { isVibrationEnabled() {
return storage.getItem('isVibration') ==null ? false :true; return (storage.getItem('isVibration') ==null) || (storage.getItem('isVibration')) ==false ? false :true;
} }
vibrate(){ vibrate(callback, context) async{
if (callback == null)
return null;
if(isVibrationEnabled() ==true){ if(isVibrationEnabled() ==true){
HapticFeedback.vibrate(); if (await Vibration.hasVibrator()) {
Vibration.vibrate(duration: 100);
callback();
}
}else{
callback();
} }
} }
@ -35,5 +44,23 @@ class PermissionService extends BaseService {
isThemeEnabled() { isThemeEnabled() {
return storage.getItem('isTheme'); return storage.getItem('isTheme');
} }
cameraPermission() async{
Map<Permission, PermissionStatus> statuses = await [
Permission.camera,
].request();
}
isCameraEnabled() async{
print(await Permission.camera.status);
return await Permission.camera.status == PermissionStatus.granted ? true : false;
}
setCameraLocationPermission(context) async{
Navigator.pop(context);
openAppSettings();
}
isLocationEnabled() async{
return await Permission.location.status == PermissionStatus.granted ? true : false;
}
openSettings() async{
openAppSettings();
}
} }

@ -213,8 +213,6 @@ class TranslationBase {
String get upcomingConfirmMore => String get upcomingConfirmMore =>
localizedValues['book-success-confirm-more-24-1-2'][locale.languageCode]; localizedValues['book-success-confirm-more-24-1-2'][locale.languageCode];
String get upcomingPaymentPending =>
localizedValues['upcoming-payment-pending'][locale.languageCode];
String get upcomingPaymentNow => localizedValues['upcoming-payment-now'][locale.languageCode]; String get upcomingPaymentNow => localizedValues['upcoming-payment-now'][locale.languageCode];
@ -766,8 +764,6 @@ class TranslationBase {
String get failedToAccessHmgServices => localizedValues['failedToAccessHmgServices'][locale.languageCode]; String get failedToAccessHmgServices => localizedValues['failedToAccessHmgServices'][locale.languageCode];
String get enablingWifi => localizedValues['enablingWifi'][locale.languageCode]; String get enablingWifi => localizedValues['enablingWifi'][locale.languageCode];
String get offerAndPackages => localizedValues['offerAndPackages'][locale.languageCode]; String get offerAndPackages => localizedValues['offerAndPackages'][locale.languageCode];
String get itemInSearch =>
localizedValues['ItemInSearch'][locale.languageCode];
String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode]; String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode];
String get specialResult => String get specialResult =>
localizedValues['SpecialResult'][locale.languageCode]; localizedValues['SpecialResult'][locale.languageCode];

@ -93,7 +93,7 @@ class _ButtonState extends State<Button> with TickerProviderStateMixin {
onTapCancel: () { onTapCancel: () {
_animationController.forward(); _animationController.forward();
}, },
onTap: (){Feedback.wrapForTap(widget.onTap, context); permission.vibrate();}, onTap: (){Feedback.wrapForTap(widget.onTap, context);},
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: Transform.scale( child: Transform.scale(
scale: _buttonSize, scale: _buttonSize,

@ -24,6 +24,6 @@ class DefaultButton extends StatelessWidget {
this.text, this.text,
style: TextStyle(fontSize: SizeConfig.textMultiplier * 2), style: TextStyle(fontSize: SizeConfig.textMultiplier * 2),
), ),
onPressed: () =>{ this.onPress(), permission.vibrate()})); onPressed: () =>{ this.onPress(), }));
} }
} }

@ -88,7 +88,7 @@ class _MiniButtonState extends State<MiniButton> with TickerProviderStateMixin {
_animationController.forward(); _animationController.forward();
}, },
// onTap: Feedback.wrapForTap(widget.onTap, context), // onTap: Feedback.wrapForTap(widget.onTap, context),
onTap: () =>{ widget.onTap(), permission.vibrate()}, onTap: () =>{ widget.onTap(), },
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: Transform.scale( child: Transform.scale(
scale: _buttonSize, scale: _buttonSize,

@ -144,7 +144,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
onTapCancel: () { onTapCancel: () {
_animationController.forward(); _animationController.forward();
}, },
onTap: () =>{ widget.disabled ? null : widget.onTap(), permission.vibrate()}, onTap: () =>{ widget.disabled ? null : widget.onTap(), },
// onTap: widget.disabled?null:Feedback.wrapForTap(widget.onTap, context), // onTap: widget.disabled?null:Feedback.wrapForTap(widget.onTap, context),
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: Transform.scale( child: Transform.scale(

@ -15,6 +15,7 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
@ -48,8 +49,7 @@ class _AppDrawerState extends State<AppDrawer> {
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
VitalSignService _vitalSignService = locator<VitalSignService>(); VitalSignService _vitalSignService = locator<VitalSignService>();
AppointmentRateViewModel appointmentRateViewModel = AppointmentRateViewModel appointmentRateViewModel =
locator<AppointmentRateViewModel>(); locator<AppointmentRateViewModel>();

@ -10,17 +10,17 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart';
class MyInAppBrowser extends InAppBrowser { class MyInAppBrowser extends InAppBrowser {
static String SERVICE_URL = // static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT // 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String PREAUTH_SERVICE_URL = // static String PREAUTH_SERVICE_URL =
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT // 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL = static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
static List<String> successURLS = [ static List<String> successURLS = [
'success', 'success',
@ -107,13 +107,16 @@ class MyInAppBrowser extends InAppBrowser {
String projId, String projId,
String emailId, String emailId,
String paymentMethod, String paymentMethod,
dynamic patientType,
String patientName,
dynamic patientID,
AuthenticatedUser authenticatedUser, AuthenticatedUser authenticatedUser,
InAppBrowser browser) { InAppBrowser browser) {
getDeviceToken(); getDeviceToken();
this.browser = browser; this.browser = browser;
this.browser.openUrl( this.browser.openUrl(
url: generateURL(amount, orderDesc, transactionID, projId, emailId, url: generateURL(amount, orderDesc, transactionID, projId, emailId,
paymentMethod, authenticatedUser)); paymentMethod, patientType, patientName, patientID, authenticatedUser));
} }
openBrowser(String url) { openBrowser(String url) {
@ -128,6 +131,9 @@ class MyInAppBrowser extends InAppBrowser {
String projId, String projId,
String emailId, String emailId,
String paymentMethod, String paymentMethod,
dynamic patientType,
String patientName,
dynamic patientID,
AuthenticatedUser authUser, AuthenticatedUser authUser,
[var patientData, [var patientData,
var servID, var servID,
@ -136,11 +142,11 @@ class MyInAppBrowser extends InAppBrowser {
String currentLanguageID = getLanguageID() == 'ar' ? 'AR' : 'EN'; String currentLanguageID = getLanguageID() == 'ar' ? 'AR' : 'EN';
String form = getForm(); String form = getForm();
if (authUser != null) { // if (authUser != null) {
form = form.replaceFirst("EMAIL_VALUE", authUser.emailAddress); // form = form.replaceFirst("EMAIL_VALUE", authUser.emailAddress);
} else { // } else {
form = form.replaceFirst("EMAIL_VALUE", emailId); form = form.replaceFirst("EMAIL_VALUE", emailId);
} // }
form = form.replaceFirst('AMOUNT_VALUE', amount.toString()); form = form.replaceFirst('AMOUNT_VALUE', amount.toString());
form = form.replaceFirst('ORDER_DESCRIPTION_VALUE', orderDesc); form = form.replaceFirst('ORDER_DESCRIPTION_VALUE', orderDesc);
@ -152,7 +158,7 @@ class MyInAppBrowser extends InAppBrowser {
form = form.replaceFirst('PATIENT_OUT_SA', form = form.replaceFirst('PATIENT_OUT_SA',
authUser.outSA == 0 ? false.toString() : true.toString()); authUser.outSA == 0 ? false.toString() : true.toString());
form = form.replaceFirst('PATIENT_TYPE_ID', form = form.replaceFirst('PATIENT_TYPE_ID',
patientData == null ? authUser.patientType.toString() : "1"); patientData == null ? patientType.toString() : "1");
// form = form.replaceFirst('DEVICE_TOKEN', this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false) + "," + this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false)); // form = form.replaceFirst('DEVICE_TOKEN', this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false) + "," + this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false));
// form = form.replaceFirst('LATITUDE_VALUE', this.cs.sharedService.getSharedData('userLat', false)); // form = form.replaceFirst('LATITUDE_VALUE', this.cs.sharedService.getSharedData('userLat', false));
@ -172,13 +178,13 @@ class MyInAppBrowser extends InAppBrowser {
form = form.replaceFirst('LIVE_SERVICE_ID', "2"); form = form.replaceFirst('LIVE_SERVICE_ID', "2");
} }
if (patientData == null) { // if (patientData == null) {
form = form.replaceFirst('CUSTNAME_VALUE', authUser.firstName); form = form.replaceFirst('CUSTNAME_VALUE', patientName);
form = form.replaceFirst('CUSTID_VALUE', authUser.patientID.toString()); form = form.replaceFirst('CUSTID_VALUE', patientID.toString());
} else { // } else {
form = form.replaceFirst('CUSTNAME_VALUE', patientData.depositorName); // form = form.replaceFirst('CUSTNAME_VALUE', patientData.depositorName);
form = form.replaceFirst('CUSTID_VALUE', patientData.fileNumber); // form = form.replaceFirst('CUSTID_VALUE', patientData.fileNumber);
} // }
form = form.replaceFirst('LATITUDE_VALUE', "24.708488"); form = form.replaceFirst('LATITUDE_VALUE', "24.708488");
form = form.replaceFirst('LONGITUDE_VALUE', "46.665925"); form = form.replaceFirst('LONGITUDE_VALUE', "46.665925");

@ -40,6 +40,7 @@ class AppScaffold extends StatelessWidget {
final String description; final String description;
final String image; final String image;
final bool isShowDecPage; final bool isShowDecPage;
final Color backgroundColor;
final List<String> infoList; final List<String> infoList;
final List<ImagesInfo> imagesInfo; final List<ImagesInfo> imagesInfo;
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject =
@ -60,7 +61,7 @@ class AppScaffold extends StatelessWidget {
this.isBottomBar, this.isBottomBar,
this.image, this.image,
this.infoList, this.infoList,
this.imagesInfo}); this.imagesInfo, this.backgroundColor});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

@ -1,5 +1,9 @@
import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/login/login-type.dart'; import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -8,12 +12,24 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class NotAutPage extends StatelessWidget { import '../../splashPage.dart';
class NotAutPage extends StatefulWidget {
final String title; final String title;
final String description; final String description;
final List<String> infoList; final List<String> infoList;
final List<ImagesInfo> imagesInfo;
NotAutPage({@required this.title, @required this.description, this.infoList, this.imagesInfo});
@override
_NotAutPageState createState() => _NotAutPageState();
}
class _NotAutPageState extends State<NotAutPage> {
int _current = 0;
NotAutPage({@required this.title, @required this.description, this.infoList});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -25,7 +41,7 @@ class NotAutPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts( Texts(
title ?? 'Service', widget.title ?? 'Service',
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontSize: 25, fontSize: 25,
bold: true, bold: true,
@ -36,17 +52,17 @@ class NotAutPage extends StatelessWidget {
height: 12, height: 12,
), ),
Texts( Texts(
description ?? 'Description', widget.description ?? 'Description',
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 17, fontSize: 17,
), ),
if (infoList != null) if (widget.infoList != null)
SizedBox( SizedBox(
height: 12, height: 12,
), ),
if (infoList != null) if (widget.infoList != null)
...List.generate( ...List.generate(
infoList.length, widget.infoList.length,
(index) => Container( (index) => Container(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -64,7 +80,7 @@ class NotAutPage extends StatelessWidget {
), ),
), ),
SizedBox(width: 6,), SizedBox(width: 6,),
Expanded(child: Texts('${infoList[index]}')) Expanded(child: Texts('${widget.infoList[index]}'))
], ],
), ),
SizedBox(height: 12,), SizedBox(height: 12,),
@ -75,6 +91,7 @@ class NotAutPage extends StatelessWidget {
SizedBox( SizedBox(
height: 22, height: 22,
), ),
if(!projectViewModel.isInternetConnection)
Center( Center(
child: SizedBox( child: SizedBox(
height: MediaQuery.of(context).size.height * 0.55, height: MediaQuery.of(context).size.height * 0.55,
@ -84,6 +101,24 @@ class NotAutPage extends StatelessWidget {
: 'assets/images/wifi-EN.png'), : 'assets/images/wifi-EN.png'),
), ),
), ),
if(projectViewModel.isInternetConnection && widget.imagesInfo!=null)
CarouselSlider(
items: widget.imagesInfo.map((image) {
return Builder(
builder: (BuildContext context){
return SizedBox(
width: MediaQuery.of(context).size.width * 0.50,
child: Image.network(projectViewModel.isArabic ? image.imageAr : image.imageEn));
},
);
}).toList(),
options: CarouselOptions(
height: MediaQuery.of(context).size.height * 0.55,
autoPlay: widget.imagesInfo.length>1,
viewportFraction: 1.0,
),
),
SizedBox( SizedBox(
height: 77, height: 77,
), ),
@ -98,8 +133,9 @@ class NotAutPage extends StatelessWidget {
Container( Container(
width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton( child: SecondaryButton(
onTap: () => Navigator.pushReplacement( onTap: (){
context, FadePage(page: LoginType())), loginCheck(context);
},
label: TranslationBase.of(context).serviceInformationButton, label: TranslationBase.of(context).serviceInformationButton,
textColor: Theme.of(context).backgroundColor), textColor: Theme.of(context).backgroundColor),
), ),
@ -108,4 +144,16 @@ class NotAutPage extends StatelessWidget {
), ),
); );
} }
loginCheck(context) async{
var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);
if (data != null) {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
}
}
} }

@ -100,6 +100,7 @@ dependencies:
# Location Helper # Location Helper
map_launcher: ^0.8.1 map_launcher: ^0.8.1
#Calendar Events #Calendar Events
manage_calendar_events: ^1.0.2 manage_calendar_events: ^1.0.2
@ -141,12 +142,15 @@ dependencies:
device_calendar: ^3.1.0 device_calendar: ^3.1.0
#Handle Geolocation #Handle Geolocation
geolocator: ^6.0.0+1 geolocator: ^6.1.10
screen: ^0.0.5 screen: ^0.0.5
#google maps places #google maps places
google_maps_place_picker: ^1.0.0 google_maps_place_picker: ^1.0.0
#countdown timer for Upcoming List
flutter_countdown_timer: ^1.4.0
#Dependencies for video call implementation #Dependencies for video call implementation
native_device_orientation: ^0.3.0 native_device_orientation: ^0.3.0
enum_to_string: ^1.0.9 enum_to_string: ^1.0.9
@ -157,6 +161,7 @@ dependencies:
flutter_tts: ^1.2.6 flutter_tts: ^1.2.6
wifi: ^0.1.5 wifi: ^0.1.5
vibration: ^1.7.3
speech_to_text: speech_to_text:
path: speech_to_text path: speech_to_text

Loading…
Cancel
Save