diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
index cb6be309..c5ff5d37 100644
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 11.0
+ 13.0
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index 43474d39..13782c80 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -39,7 +39,7 @@
LSRequiresIPhoneOS
MinimumOSVersion
- 11.0
+ 13.0
NFCReaderUsageDescription
This app requires NFC Usage access to allow for Online CheckIn for appointments.
NSAppTransportSecurity
@@ -60,7 +60,7 @@
NSCalendarsUsageDescription
This app requires calendar access to set reminders for Virtual & Normal Appointments.
NSCalendarsWriteOnlyAccessUsageDescription
- This app requires calendar access to set reminders for Virtual & Normal Appointments.
+ This app requires calendar access to set reminders for Virtual & Normal Appointments.
NSCalendarsFullAccessUsageDescription
This app requires calendar access to set reminders for Virtual & Normal Appointments.
NSCameraUsageDescription
diff --git a/lib/config/config.dart b/lib/config/config.dart
index 063ad690..75eac393 100644
--- a/lib/config/config.dart
+++ b/lib/config/config.dart
@@ -22,8 +22,8 @@ var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/';
// var BASE_URL = 'http://10.50.100.198:4422/';
-var BASE_URL = 'https://uat.hmgwebservices.com/';
-// var BASE_URL = 'https://hmgwebservices.com/';
+// var BASE_URL = 'https://uat.hmgwebservices.com/';
+var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.20.200.111:1010/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
@@ -344,7 +344,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari
var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20';
-var VERSION_ID = 16.3;
+var VERSION_ID = 16.4;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;
@@ -668,10 +668,10 @@ var GET_DENTAL_INSTRUCTIONS = 'Services/OUTPs.svc/Rest/getProcedureNotification'
//PAYFORT
var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails";
var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";
-// var payFortEnvironment = FortEnvironment.production;
-// var applePayMerchantId = "merchant.com.hmgwebservices";
-var payFortEnvironment = FortEnvironment.test;
-var applePayMerchantId = "merchant.com.hmgwebservices.uat";
+var payFortEnvironment = FortEnvironment.production;
+var applePayMerchantId = "merchant.com.hmgwebservices";
+// var payFortEnvironment = FortEnvironment.test;
+// var applePayMerchantId = "merchant.com.hmgwebservices.uat";
class AppGlobal {
static var context;
diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart
index d8f30f0c..98a884f4 100644
--- a/lib/core/service/client/base_app_client.dart
+++ b/lib/core/service/client/base_app_client.dart
@@ -31,8 +31,7 @@ AppSharedPreferences sharedPref = new AppSharedPreferences();
/// onFailure: (String error, int statusCode) {},
/// body: Map();
///
-AuthenticatedUserObject authenticatedUserObject =
- locator();
+AuthenticatedUserObject authenticatedUserObject = locator();
VitalSignService _vitalSignService = locator();
class BaseAppClient {
@@ -40,12 +39,12 @@ class BaseAppClient {
post(String endPoint,
{required Map body,
- required Function(dynamic response, int statusCode) onSuccess,
- required Function(String error, int statusCode) onFailure,
- bool isAllowAny = false,
- bool isExternal = false,
- bool isRCService = false,
- bool bypassConnectionCheck = false}) async {
+ required Function(dynamic response, int statusCode) onSuccess,
+ required Function(String error, int statusCode) onFailure,
+ bool isAllowAny = false,
+ bool isExternal = false,
+ bool isRCService = false,
+ bool bypassConnectionCheck = false}) async {
String url;
if (isExternal) {
url = endPoint;
@@ -56,25 +55,20 @@ class BaseAppClient {
url = BASE_URL + endPoint;
}
try {
- String? pharmacyToken =
- await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
+ String? pharmacyToken = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
var user = await sharedPref.getObject(USER_PROFILE);
- Map headers = {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- };
+ Map headers = {'Content-Type': 'application/json', 'Accept': 'application/json'};
if (!isExternal) {
String? token = await sharedPref.getString(TOKEN);
- String? languageID =
- await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ String? languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
if (endPoint == SEND_ACTIVATION_CODE) {
languageID = 'en';
}
if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null
- ? body['SetupID']
- : SETUP_ID
+ ? body['SetupID']
+ : SETUP_ID
: SETUP_ID;
}
@@ -87,8 +81,8 @@ class BaseAppClient {
body['LanguageID'] = body['LanguageID'] == 'ar'
? 1
: body['LanguageID'] == 'en'
- ? 2
- : body['LanguageID'];
+ ? 2
+ : body['LanguageID'];
} else {
body['LanguageID'] = Provider.of(AppGlobal.context, listen: false).isArabic ? 1 : 2;
}
@@ -120,16 +114,16 @@ class BaseAppClient {
if (body.containsKey('isDentalAllowedBackend')) {
body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
? body['isDentalAllowedBackend'] != null
- ? body['isDentalAllowedBackend']
- : IS_DENTAL_ALLOWED_BACKEND
+ ? body['isDentalAllowedBackend']
+ : IS_DENTAL_ALLOWED_BACKEND
: IS_DENTAL_ALLOWED_BACKEND;
}
body['DeviceTypeID'] = Platform.isIOS
? 1
: await Utils.isGoogleServicesAvailable()
- ? 2
- : 3;
+ ? 2
+ : 3;
if (!body.containsKey('IsPublicRequest')) {
// if (!body.containsKey('PatientType')) {
@@ -166,17 +160,14 @@ class BaseAppClient {
if (user != null) {
body['TokenID'] = body['TokenID'] != null ? body['TokenID'] : token;
- body['PatientID'] = body['PatientID'] != null
- ? body['PatientID']
- : user['PatientID'];
+ body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = body.containsKey('PatientOutSA')
? body['PatientOutSA'] != null
- ? body['PatientOutSA']
- : user['OutSA']
+ ? body['PatientOutSA']
+ : user['OutSA']
: user['OutSA'];
- body['SessionID'] = getSessionId(
- body['TokenID'] != null ? body['TokenID'] : ""); //getSe
+ body['SessionID'] = getSessionId(body['TokenID'] != null ? body['TokenID'] : ""); //getSe
// body['SessionID'] = body['TokenID']; //getSe
// headers = {
@@ -202,21 +193,23 @@ class BaseAppClient {
body.removeWhere((key, value) => key == null || value == null);
+ // if (url == 'https://uat.hmgwebservices.com/Services/NHIC.svc/REST/GetPatientInfo') {
+ // url = "https://hmgwebservices.com/Services/NHIC.svc/REST/GetPatientInfo";
+ // body['TokenID'] = "@dm!n";
+ // }
+
// if (AppGlobal.isNetworkDebugEnabled) {
- print("URL : $url");
- final jsonBody = json.encode(body);
- print(jsonBody);
+ // print("URL : $url");
+ // final jsonBody = json.encode(body);
+ // print(jsonBody);
// }
- if (await Utils.checkConnection(
- bypassConnectionCheck: bypassConnectionCheck)) {
- final response = await http.post(Uri.parse(url.trim()),
- body: json.encode(body), headers: headers);
+ if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) {
+ final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);
final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode);
- logApiEndpointError(
- endPoint, 'Error While Fetching data', statusCode);
+ logApiEndpointError(endPoint, 'Error While Fetching data', statusCode);
} else {
// var decoded = utf8.decode(response.bodyBytes);
var parsed = json.decode(utf8.decode(response.bodyBytes));
@@ -230,12 +223,8 @@ class BaseAppClient {
onSuccess(parsed, statusCode);
} else {
if (parsed['ErrorType'] == 4) {
- navigateToAppUpdate(
- AppGlobal.context, parsed['ErrorEndUserMessage']);
- logApiEndpointError(
- endPoint,
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']);
+ logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
if (parsed['ErrorType'] == 2) {
await logout();
@@ -254,46 +243,28 @@ class BaseAppClient {
// if (parsed != null) {
// onSuccess(parsed, statusCode);
// } else {
- onFailure(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
- logApiEndpointError(
- endPoint,
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
+ logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
// logout();
// }
}
- } else if (parsed['MessageStatus'] == 1 ||
- parsed['SMSLoginRequired'] == true) {
+ } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
- } else if (parsed['MessageStatus'] == 2 &&
- parsed['IsAuthenticated']) {
+ } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode);
} else {
- if (parsed['message'] == null &&
- parsed['ErrorEndUserMessage'] == null) {
+ if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) {
- onFailure("Server Error found with no available message",
- statusCode);
- logApiEndpointError(
- endPoint,
- "Server Error found with no available message",
- statusCode);
+ onFailure("Server Error found with no available message", statusCode);
+ logApiEndpointError(endPoint, "Server Error found with no available message", statusCode);
} else {
onFailure(parsed['ErrorSearchMsg'], statusCode);
- logApiEndpointError(
- endPoint, parsed['ErrorSearchMsg'], statusCode);
+ logApiEndpointError(endPoint, parsed['ErrorSearchMsg'], statusCode);
}
} else {
- onFailure(
- parsed['message'] ??
- parsed['ErrorEndUserMessage'] ??
- parsed['ErrorMessage'],
- statusCode);
- logApiEndpointError(endPoint,
- parsed['message'] ?? parsed['message'], statusCode);
+ onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
+ logApiEndpointError(endPoint, parsed['message'] ?? parsed['message'], statusCode);
}
}
}
@@ -305,18 +276,11 @@ class BaseAppClient {
onSuccess(parsed, statusCode);
} else {
if (parsed['message'] != null) {
- onFailure(
- parsed['message'] ?? parsed['message'], statusCode);
- logApiEndpointError(endPoint,
- parsed['message'] ?? parsed['message'], statusCode);
+ onFailure(parsed['message'] ?? parsed['message'], statusCode);
+ logApiEndpointError(endPoint, parsed['message'] ?? parsed['message'], statusCode);
} else {
- onFailure(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
- logApiEndpointError(
- endPoint,
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
+ logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
}
@@ -325,23 +289,17 @@ class BaseAppClient {
}
} else {
onFailure('Please Check The Internet Connection', -1);
- _analytics.errorTracking
- .log("internet_connectivity", error: "no internet available");
+ _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
}
} catch (e) {
print(e);
onFailure(e.toString(), -1);
- _analytics.errorTracking
- .log(endPoint, error: "api exception: $e - API Path: $url");
+ _analytics.errorTracking.log(endPoint, error: "api exception: $e - API Path: $url");
}
}
postPharmacy(String endPoint,
- {Map? body,
- Function(dynamic response, int statusCode)? onSuccess,
- Function(String error, int statusCode)? onFailure,
- bool isAllowAny = false,
- bool isExternal = false}) async {
+ {Map? body, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure, bool isAllowAny = false, bool isExternal = false}) async {
var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
var user = await sharedPref.getObject(USER_PROFILE);
String url;
@@ -358,16 +316,13 @@ class BaseAppClient {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': pharmacyToken ?? '',
- 'Mobilenumber': user != null
- ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString())
- : "",
+ 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user != null ? user['PatientID'].toString() : "",
};
if (!isExternal) {
String token = await sharedPref.getString(TOKEN);
- var languageID =
- await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
// if (body.containsKey('SetupID')) {
// body['SetupID'] = body.containsKey('SetupID')
@@ -429,14 +384,12 @@ class BaseAppClient {
print("Headers : ${json.encode(headers)}");
if (await Utils.checkConnection()) {
- final response = await http.post(Uri.parse(url.trim()),
- body: json.encode(body), headers: headers);
+ final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);
final int statusCode = response.statusCode;
// print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure!('Error While Fetching data', statusCode);
- logApiEndpointError(
- endPoint, 'Error While Fetching data', statusCode);
+ logApiEndpointError(endPoint, 'Error While Fetching data', statusCode);
} else {
// var parsed = json.decode(response.body.toString());
var parsed = json.decode(utf8.decode(response.bodyBytes));
@@ -444,12 +397,8 @@ class BaseAppClient {
onSuccess!(parsed, statusCode);
} else {
if (parsed['ErrorType'] == 4) {
- navigateToAppUpdate(
- AppGlobal.context, parsed['ErrorEndUserMessage']);
- logApiEndpointError(
- endPoint,
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']);
+ logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
if (isAllowAny) {
onSuccess!(parsed, statusCode);
@@ -464,56 +413,29 @@ class BaseAppClient {
if (parsed != null) {
onSuccess!(parsed, statusCode);
} else {
- onFailure!(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
- logApiEndpointError(
- endPoint,
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
- logApiEndpointError(
- endPoint, 'session logged out', statusCode);
+ onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
+ logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
+ logApiEndpointError(endPoint, 'session logged out', statusCode);
logout();
}
}
- } else if (parsed['MessageStatus'] == 1 ||
- parsed['SMSLoginRequired'] == true) {
+ } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
onSuccess!(parsed, statusCode);
- } else if (parsed['MessageStatus'] == 2 &&
- parsed['IsAuthenticated']) {
+ } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
if (parsed['SameClinicApptList'] != null) {
onSuccess!(parsed, statusCode);
} else {
- if (parsed['message'] == null &&
- parsed['ErrorEndUserMessage'] == null) {
+ if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) {
- onFailure!("Server Error found with no available message",
- statusCode);
- logApiEndpointError(
- endPoint,
- "Server Error found with no available message",
- statusCode);
+ onFailure!("Server Error found with no available message", statusCode);
+ logApiEndpointError(endPoint, "Server Error found with no available message", statusCode);
} else {
onFailure!(parsed['ErrorSearchMsg'], statusCode);
- logApiEndpointError(
- endPoint,
- parsed['ErrorSearchMsg'] ??
- parsed['ErrorEndUserMessage'] ??
- parsed['ErrorMessage'],
- statusCode);
+ logApiEndpointError(endPoint, parsed['ErrorSearchMsg'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
} else {
- onFailure!(
- parsed['message'] ??
- parsed['ErrorEndUserMessage'] ??
- parsed['ErrorMessage'],
- statusCode);
- logApiEndpointError(
- endPoint,
- parsed['message'] ??
- parsed['ErrorEndUserMessage'] ??
- parsed['ErrorMessage'],
- statusCode);
+ onFailure!(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
+ logApiEndpointError(endPoint, parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
} else if (!parsed['IsAuthenticated']) {
@@ -525,22 +447,11 @@ class BaseAppClient {
onSuccess!(parsed, statusCode);
} else {
if (parsed['message'] != null) {
- onFailure!(
- parsed['message'] ?? parsed['message'], statusCode);
- logApiEndpointError(
- endPoint,
- parsed['message'] ??
- parsed['ErrorEndUserMessage'] ??
- parsed['ErrorMessage'],
- statusCode);
+ onFailure!(parsed['message'] ?? parsed['message'], statusCode);
+ logApiEndpointError(endPoint, parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
} else {
- onFailure!(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
- logApiEndpointError(
- endPoint,
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
+ logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
}
@@ -548,8 +459,7 @@ class BaseAppClient {
}
} else {
onFailure!('Please Check The Internet Connection', -1);
- _analytics.errorTracking
- .log("internet_connectivity", error: "no internet available");
+ _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
}
} catch (e) {
print(e);
@@ -560,18 +470,18 @@ class BaseAppClient {
Future navigateToAppUpdate(context, String text) async {
Navigator.pushAndRemoveUntil(
- locator().navigatorKey.currentContext!,
+ locator().navigatorKey.currentContext!,
MaterialPageRoute(builder: (context) => AppUpdatePage(appUpdateText: text)),
- (Route route) => false,
+ (Route route) => false,
);
}
get(String endPoint,
{required Function(dynamic response, int statusCode) onSuccess,
- required Function(String error, int statusCode) onFailure,
- Map? queryParams,
- bool isExternal = false,
- bool isRCService = false}) async {
+ required Function(String error, int statusCode) onFailure,
+ Map? queryParams,
+ bool isExternal = false,
+ bool isRCService = false}) async {
String url;
if (isExternal) {
url = endPoint;
@@ -592,10 +502,7 @@ class BaseAppClient {
if (await Utils.checkConnection()) {
final response = await http.get(
Uri.parse(url.trim()),
- headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- },
+ headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
);
final int statusCode = response.statusCode;
// print("statusCode :$statusCode");
@@ -609,17 +516,16 @@ class BaseAppClient {
}
} else {
onFailure!('Please Check The Internet Connection', -1);
- _analytics.errorTracking
- .log("internet_connectivity", error: "no internet available");
+ _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
}
}
getPharmacy(String endPoint,
{required Function(dynamic response, int statusCode) onSuccess,
- required Function(String error, int statusCode) onFailure,
- bool isAllowAny = false,
- bool isExternal = false,
- Map? queryParams}) async {
+ required Function(String error, int statusCode) onFailure,
+ bool isAllowAny = false,
+ bool isExternal = false,
+ Map? queryParams}) async {
var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
var user = await sharedPref.getObject(USER_PROFILE);
@@ -642,9 +548,7 @@ class BaseAppClient {
'Content-Type': 'text/html; charset=utf-8',
'Accept': 'application/json',
'Authorization': token ?? '',
- 'Mobilenumber': user != null
- ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString())
- : "",
+ 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user != null ? user['PatientID'].toString() : "",
// 'Host': "mdlaboratories.com",
@@ -654,19 +558,14 @@ class BaseAppClient {
if (statusCode < 200 || statusCode >= 400 || json == null) {
if (statusCode == 401) {
- onFailure!(TranslationBase.of(AppGlobal.context).pharmacyRelogin,
- statusCode);
- logApiEndpointError(
- endPoint,
- TranslationBase.of(AppGlobal.context).pharmacyRelogin,
- statusCode);
+ onFailure!(TranslationBase.of(AppGlobal.context).pharmacyRelogin, statusCode);
+ logApiEndpointError(endPoint, TranslationBase.of(AppGlobal.context).pharmacyRelogin, statusCode);
Navigator.of(AppGlobal.context).pushNamed(HOME);
} else {
var bodyUtf = json.decode(utf8.decode(response.bodyBytes));
// print(bodyUtf);
onFailure!(bodyUtf['error']['ErrorEndUserMsg'], statusCode);
- logApiEndpointError(
- endPoint, bodyUtf['error']['ErrorEndUserMsg'], statusCode);
+ logApiEndpointError(endPoint, bodyUtf['error']['ErrorEndUserMsg'], statusCode);
}
} else {
// var parsed = json.decode(response.body.toString());
@@ -675,25 +574,23 @@ class BaseAppClient {
}
} else {
onFailure!('Please Check The Internet Connection', -1);
- _analytics.errorTracking
- .log("internet_connectivity", error: "no internet available");
+ _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
}
}
simplePost(
- String fullUrl, {
- required Map body,
- required Map headers,
- required Function(dynamic response, int statusCode) onSuccess,
- required Function(String error, int statusCode) onFailure,
- }) async {
+ String fullUrl, {
+ required Map body,
+ required Map headers,
+ required Function(dynamic response, int statusCode) onSuccess,
+ required Function(String error, int statusCode) onFailure,
+ }) async {
String url = fullUrl;
// print("URL Query String: $url");
// print("body: $body");
if (await Utils.checkConnection()) {
- headers!.addAll(
- {'Content-Type': 'application/json', 'Accept': 'application/json'});
+ headers!.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'});
final response = await http.post(
Uri.parse(url.trim()),
body: json.encode(body),
@@ -701,12 +598,7 @@ class BaseAppClient {
);
final int statusCode = response.statusCode;
// print("statusCode :$statusCode");
- if (await handleUnauthorized(statusCode, forUrl: fullUrl))
- simplePost(fullUrl,
- onFailure: onFailure,
- onSuccess: onSuccess,
- body: body,
- headers: headers);
+ if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simplePost(fullUrl, onFailure: onFailure, onSuccess: onSuccess, body: body, headers: headers);
// print(response.body.toString());
@@ -718,16 +610,12 @@ class BaseAppClient {
}
} else {
onFailure!('Please Check The Internet Connection', -1);
- _analytics.errorTracking
- .log("internet_connectivity", error: "no internet available");
+ _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
}
}
simpleGet(String fullUrl,
- {Function(dynamic response, int statusCode)? onSuccess,
- Function(String error, int statusCode)? onFailure,
- Map? queryParams,
- Map? headers}) async {
+ {Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure, Map? queryParams, Map? headers}) async {
headers = headers ?? {};
String url = fullUrl;
@@ -739,8 +627,7 @@ class BaseAppClient {
}
if (await Utils.checkConnection()) {
- headers.addAll(
- {'Content-Type': 'application/json', 'Accept': 'application/json'});
+ headers.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'});
final response = await http.get(
Uri.parse(url.trim()),
headers: headers,
@@ -748,12 +635,7 @@ class BaseAppClient {
final int statusCode = response.statusCode;
// print("statusCode :$statusCode");
- if (await handleUnauthorized(statusCode, forUrl: fullUrl))
- simpleGet(fullUrl,
- onFailure: onFailure,
- onSuccess: onSuccess,
- headers: headers,
- queryParams: queryParams);
+ if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simpleGet(fullUrl, onFailure: onFailure, onSuccess: onSuccess, headers: headers, queryParams: queryParams);
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure!('Error While Fetching data', statusCode);
@@ -763,22 +645,17 @@ class BaseAppClient {
}
} else {
onFailure!('Please Check The Internet Connection', -1);
- _analytics.errorTracking
- .log("internet_connectivity", error: "no internet available");
+ _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
}
}
simplePut(String fullUrl,
- {Map? body,
- Map? headers,
- Function(dynamic response, int statusCode)? onSuccess,
- Function(String error, int statusCode)? onFailure}) async {
+ {Map? body, Map? headers, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure}) async {
String url = fullUrl;
// print("URL Query String: $url");
if (await Utils.checkConnection()) {
- headers!.addAll(
- {'Content-Type': 'application/json', 'Accept': 'application/json'});
+ headers!.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'});
final response = await http.put(
Uri.parse(url.trim()),
body: json.encode(body),
@@ -787,12 +664,7 @@ class BaseAppClient {
final int statusCode = response.statusCode;
// print("statusCode :$statusCode");
- if (await handleUnauthorized(statusCode, forUrl: fullUrl))
- simplePut(fullUrl,
- onFailure: onFailure,
- onSuccess: onSuccess,
- headers: headers,
- body: body);
+ if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simplePut(fullUrl, onFailure: onFailure, onSuccess: onSuccess, headers: headers, body: body);
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure!('Error While Fetching data', statusCode);
@@ -802,16 +674,12 @@ class BaseAppClient {
}
} else {
onFailure!('Please Check The Internet Connection', -1);
- _analytics.errorTracking
- .log("internet_connectivity", error: "no internet available");
+ _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
}
}
simpleDelete(String fullUrl,
- {Function(dynamic response, int statusCode)? onSuccess,
- Function(String error, int statusCode)? onFailure,
- Map? queryParams,
- Map? headers}) async {
+ {Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure, Map? queryParams, Map? headers}) async {
String url = fullUrl;
// print("URL Query String: $url");
@@ -823,8 +691,7 @@ class BaseAppClient {
}
if (await Utils.checkConnection()) {
- headers!.addAll(
- {'Content-Type': 'application/json', 'Accept': 'application/json'});
+ headers!.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'});
final response = await http.delete(
Uri.parse(url.trim()),
headers: headers,
@@ -832,12 +699,7 @@ class BaseAppClient {
final int statusCode = response.statusCode;
// print("statusCode :$statusCode");
- if (await handleUnauthorized(statusCode, forUrl: fullUrl))
- simpleDelete(fullUrl,
- onFailure: onFailure,
- onSuccess: onSuccess,
- queryParams: queryParams,
- headers: headers);
+ if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simpleDelete(fullUrl, onFailure: onFailure, onSuccess: onSuccess, queryParams: queryParams, headers: headers);
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure!('Error While Fetching data', statusCode);
@@ -847,13 +709,11 @@ class BaseAppClient {
}
} else {
onFailure!('Please Check The Internet Connection', -1);
- _analytics.errorTracking
- .log("internet_connectivity", error: "no internet available");
+ _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
}
}
- Future handleUnauthorized(int statusCode,
- {required String forUrl}) async {
+ Future handleUnauthorized(int statusCode, {required String forUrl}) async {
if (forUrl.startsWith(EXA_CART_API_BASE_URL) && statusCode == 401) {
final token = await generatePackagesToken();
packagesAuthHeader['Authorization'] = 'Bearer $token';
@@ -866,10 +726,8 @@ class BaseAppClient {
await sharedPref.remove(LOGIN_TOKEN_ID);
await sharedPref.remove(PHARMACY_CUSTOMER_ID);
await authenticatedUserObject.getUser();
- Provider.of(AppGlobal.context, listen: false).isLogin =
- false;
- var model =
- Provider.of(AppGlobal.context, listen: false);
+ Provider.of(AppGlobal.context, listen: false).isLogin = false;
+ var model = Provider.of(AppGlobal.context, listen: false);
_vitalSignService.weightKg = "";
_vitalSignService.heightCm = "";
model.setState(0, 0, false, null);
@@ -884,8 +742,7 @@ class BaseAppClient {
static defaultHttpParameters() async {
String token = await sharedPref.getString(TOKEN);
- var languageID =
- await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE);
var params = {};
if (user != null) {
@@ -905,11 +762,7 @@ class BaseAppClient {
}
pharmacyPost(String endPoint,
- {Map? body,
- Function(dynamic response, int statusCode)? onSuccess,
- Function(String error, int statusCode)? onFailure,
- bool isAllowAny = false,
- bool isExternal = false}) async {
+ {Map? body, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure, bool isAllowAny = false, bool isExternal = false}) async {
var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
var user = await sharedPref.getObject(USER_PROFILE);
String url;
@@ -921,14 +774,13 @@ class BaseAppClient {
try {
if (isExternal) {
String token = await sharedPref.getString(TOKEN);
- var languageID =
- await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE);
if (body!.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null
- ? body['SetupID']
- : SETUP_ID
+ ? body['SetupID']
+ : SETUP_ID
: SETUP_ID;
}
@@ -940,15 +792,15 @@ class BaseAppClient {
body['generalid'] = GENERAL_ID;
body['PatientOutSA'] = body.containsKey('PatientOutSA')
? body['PatientOutSA'] != null
- ? body['PatientOutSA']
- : user['OutSA']
+ ? body['PatientOutSA']
+ : user['OutSA']
: user['OutSA'];
if (body.containsKey('isDentalAllowedBackend')) {
body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
? body['isDentalAllowedBackend'] != null
- ? body['isDentalAllowedBackend']
- : IS_DENTAL_ALLOWED_BACKEND
+ ? body['isDentalAllowedBackend']
+ : IS_DENTAL_ALLOWED_BACKEND
: IS_DENTAL_ALLOWED_BACKEND;
}
@@ -957,24 +809,22 @@ class BaseAppClient {
if (!body.containsKey('IsPublicRequest')) {
body['PatientType'] = body.containsKey('PatientType')
? body['PatientType'] != null
- ? body['PatientType']
- : user['PatientType'] != null
- ? user['PatientType']
- : user['PatientType']
+ ? body['PatientType']
+ : user['PatientType'] != null
+ ? user['PatientType']
+ : user['PatientType']
: user['PatientType'];
body['PatientTypeID'] = body.containsKey('PatientTypeID')
? body['PatientTypeID'] != null
- ? body['PatientTypeID']
- : user['PatientType'] != null
- ? user['PatientType']
- : user['PatientType']
+ ? body['PatientTypeID']
+ : user['PatientType'] != null
+ ? user['PatientType']
+ : user['PatientType']
: user['PatientType'];
if (user != null) {
body['TokenID'] = token;
- body['PatientID'] = body['PatientID'] != null
- ? body['PatientID']
- : user['PatientID'];
+ body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = user['OutSA'];
// body['SessionID'] = SESSION_ID; //getSessionId(token);
}
@@ -986,14 +836,11 @@ class BaseAppClient {
var ss = json.encode(body);
if (await Utils.checkConnection()) {
- final response = await http
- .post(Uri.parse(url.trim()), body: json.encode(body), headers: {
+ final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': token ?? '',
- 'Mobilenumber': user != null
- ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString())
- : "",
+ 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user != null ? user['PatientID'].toString() : "",
});
@@ -1001,15 +848,8 @@ class BaseAppClient {
// print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
var parsed = json.decode(utf8.decode(response.bodyBytes));
- onFailure!(
- parsed['error']['ErrorEndUserMsgN'] ??
- 'Error While Fetching data',
- statusCode);
- logApiEndpointError(
- endPoint,
- parsed['error']['ErrorEndUserMsgN'] ??
- 'Error While Fetching data',
- statusCode);
+ onFailure!(parsed['error']['ErrorEndUserMsgN'] ?? 'Error While Fetching data', statusCode);
+ logApiEndpointError(endPoint, parsed['error']['ErrorEndUserMsgN'] ?? 'Error While Fetching data', statusCode);
} else {
// var parsed = json.decode(response.body.toString());
var parsed = json.decode(utf8.decode(response.bodyBytes));
@@ -1017,8 +857,7 @@ class BaseAppClient {
onSuccess!(parsed, statusCode);
} else {
if (parsed['ErrorType'] == 4) {
- navigateToAppUpdate(
- AppGlobal.context, parsed['ErrorEndUserMessage']);
+ navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']);
}
if (isAllowAny) {
onSuccess!(parsed, statusCode);
@@ -1033,47 +872,25 @@ class BaseAppClient {
if (parsed != null) {
onSuccess!(parsed, statusCode);
} else {
- onFailure!(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
- logApiEndpointError(
- endPoint,
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
+ logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logout();
}
}
- } else if (parsed['MessageStatus'] == 1 ||
- parsed['SMSLoginRequired'] == true) {
+ } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
onSuccess!(parsed, statusCode);
- } else if (parsed['MessageStatus'] == 2 &&
- parsed['IsAuthenticated']) {
- if (parsed['message'] == null &&
- parsed['ErrorEndUserMessage'] == null) {
+ } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
+ if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) {
- onFailure!("Server Error found with no available message",
- statusCode);
- logApiEndpointError(
- endPoint,
- "Server Error found with no available message",
- statusCode);
+ onFailure!("Server Error found with no available message", statusCode);
+ logApiEndpointError(endPoint, "Server Error found with no available message", statusCode);
} else {
onFailure!(parsed['ErrorSearchMsg'], statusCode);
- logApiEndpointError(
- endPoint, parsed['ErrorSearchMsg'], statusCode);
+ logApiEndpointError(endPoint, parsed['ErrorSearchMsg'], statusCode);
}
} else {
- onFailure!(
- parsed['message'] ??
- parsed['ErrorEndUserMessage'] ??
- parsed['ErrorMessage'],
- statusCode);
- logApiEndpointError(
- endPoint,
- parsed['message'] ??
- parsed['ErrorEndUserMessage'] ??
- parsed['ErrorMessage'],
- statusCode);
+ onFailure!(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
+ logApiEndpointError(endPoint, parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
} else if (!parsed['IsAuthenticated']) {
await logout();
@@ -1084,18 +901,11 @@ class BaseAppClient {
onSuccess!(parsed, statusCode);
} else {
if (parsed['message'] != null) {
- onFailure!(
- parsed['message'] ?? parsed['message'], statusCode);
- logApiEndpointError(endPoint,
- parsed['message'] ?? parsed['message'], statusCode);
+ onFailure!(parsed['message'] ?? parsed['message'], statusCode);
+ logApiEndpointError(endPoint, parsed['message'] ?? parsed['message'], statusCode);
} else {
- onFailure!(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
- logApiEndpointError(
- endPoint,
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
+ logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
}
@@ -1103,8 +913,7 @@ class BaseAppClient {
}
} else {
onFailure!('Please Check The Internet Connection', -1);
- _analytics.errorTracking
- .log("internet_connectivity", error: "no internet available");
+ _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
}
} catch (e) {
print(e);
@@ -1116,15 +925,11 @@ class BaseAppClient {
Future generatePackagesToken() async {
var url = EXA_CART_API_BASE_URL + PACKAGES_TOKEN;
var body = {
- "api_client": {
- "client_id": "a4ab6be4-424f-4836-b032-46caed88e184",
- "client_secret": "3c1a3e07-4a40-4510-9fb0-ee5f0a72752c"
- }
+ "api_client": {"client_id": "a4ab6be4-424f-4836-b032-46caed88e184", "client_secret": "3c1a3e07-4a40-4510-9fb0-ee5f0a72752c"}
};
String? token;
final completer = Completer();
- simplePost(url, body: body, headers: {},
- onSuccess: (dynamic stringResponse, int statusCode) {
+ simplePost(url, body: body, headers: {}, onSuccess: (dynamic stringResponse, int statusCode) {
if (statusCode == 200) {
var jsonResponse = json.decode(stringResponse);
token = jsonResponse['auth_token'];
diff --git a/lib/pages/Blood/blood_donation_book_appointment.dart b/lib/pages/Blood/blood_donation_book_appointment.dart
index a0b9f6f7..6485b2d8 100644
--- a/lib/pages/Blood/blood_donation_book_appointment.dart
+++ b/lib/pages/Blood/blood_donation_book_appointment.dart
@@ -445,7 +445,7 @@ class _BloodDonationBookAppointmentState extends State wit
_events.forEach((key, value) {
final DateTime startTime = DateTime(key.year, key.month, key.day, 9, 0, 0);
final DateTime endTime = startTime.add(const Duration(hours: 2));
- meetings.add(Meeting("", startTime, endTime, CustomColors.green, false));
+ meetings.add(Meeting("", startTime, endTime, CustomColors.green, false, ""));
});
return meetings;
}
@@ -464,11 +464,12 @@ class MeetingDataSource extends CalendarDataSource {
}
class Meeting {
- Meeting(this.eventName, this.from, this.to, this.background, this.isAllDay);
+ Meeting(this.eventName, this.from, this.to, this.background, this.isAllDay, this.notes);
String eventName;
DateTime from;
DateTime to;
Color background;
bool isAllDay;
+ String notes;
}
diff --git a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart
index a9a16ce7..88be72dd 100644
--- a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart
+++ b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart
@@ -260,7 +260,7 @@ class _CovidTimeSlotsState extends State with TickerProviderStat
_events.forEach((key, value) {
final DateTime startTime = DateTime(key.year, key.month, key.day, 9, 0, 0);
final DateTime endTime = startTime.add(const Duration(minutes: 20));
- meetings.add(Meeting("", startTime, endTime, CustomColors.green, false));
+ meetings.add(Meeting("", startTime, endTime, CustomColors.green, false, ""));
});
return meetings;
}
@@ -584,11 +584,12 @@ class MeetingDataSource extends CalendarDataSource {
}
class Meeting {
- Meeting(this.eventName, this.from, this.to, this.background, this.isAllDay);
+ Meeting(this.eventName, this.from, this.to, this.background, this.isAllDay, this.notes);
String eventName;
DateTime from;
DateTime to;
Color background;
bool isAllDay;
+ String notes;
}
diff --git a/lib/pages/ToDoList/ObGyne/ObGyne-TimeSlots.dart b/lib/pages/ToDoList/ObGyne/ObGyne-TimeSlots.dart
index 38c09047..9660a616 100644
--- a/lib/pages/ToDoList/ObGyne/ObGyne-TimeSlots.dart
+++ b/lib/pages/ToDoList/ObGyne/ObGyne-TimeSlots.dart
@@ -253,7 +253,7 @@ class _CovidTimeSlotsState extends State with TickerProviderSta
_events!.forEach((key, value) {
final DateTime startTime = DateTime(key.year, key.month, key.day, 9, 0, 0);
final DateTime endTime = startTime.add(const Duration(minutes: 20));
- meetings.add(Meeting("", startTime, endTime, CustomColors.green, false));
+ meetings.add(Meeting("", startTime, endTime, CustomColors.green, false, ""));
});
return meetings;
}
@@ -534,11 +534,12 @@ class MeetingDataSource extends CalendarDataSource {
}
class Meeting {
- Meeting(this.eventName, this.from, this.to, this.background, this.isAllDay);
+ Meeting(this.eventName, this.from, this.to, this.background, this.isAllDay, this.notes);
String eventName;
DateTime from;
DateTime to;
Color background;
bool isAllDay;
+ String notes;
}
diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart
index 4a863890..0d6b8101 100644
--- a/lib/pages/ToDoList/ToDo.dart
+++ b/lib/pages/ToDoList/ToDo.dart
@@ -1513,7 +1513,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin {
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
- AppToast.showErrorToast(message: err);
+ AppToast.showErrorToast(message: err.toString());
});
}
diff --git a/lib/pages/insurance/insurance_update_screen.dart b/lib/pages/insurance/insurance_update_screen.dart
index 191170ef..4c4d5686 100644
--- a/lib/pages/insurance/insurance_update_screen.dart
+++ b/lib/pages/insurance/insurance_update_screen.dart
@@ -167,7 +167,7 @@ class _InsuranceUpdateState extends State with SingleTickerProv
Container(
margin: EdgeInsets.only(top: 6.5, left: 2.0),
child: Text(
- model.insuranceUpdate[index].statusDescription!,
+ model.insuranceUpdate[index].statusDescription ?? "",
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.w600,
diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart
index f984d093..ba5dd7bf 100644
--- a/lib/pages/login/confirm-login.dart
+++ b/lib/pages/login/confirm-login.dart
@@ -393,7 +393,7 @@ class _ConfirmLogin extends State {
var availableBiometrics;
try {
availableBiometrics = await auth.getAvailableBiometrics();
- print(availableBiometrics);
+ // print(availableBiometrics);
} on PlatformException catch (e) {
AppToast.showErrorToast(message: e.message!);
print(e);
@@ -1125,7 +1125,6 @@ class _ConfirmLogin extends State {
}
bool checkIfBiometricAvailable(BiometricType biometricType) {
- print(biometricType);
bool isAvailable = false;
if (_availableBiometrics != null) {
for (var i = 0; i < _availableBiometrics.length; i++) {
diff --git a/lib/pages/login/register-info.dart b/lib/pages/login/register-info.dart
index cbff3f9b..e3d2f020 100644
--- a/lib/pages/login/register-info.dart
+++ b/lib/pages/login/register-info.dart
@@ -455,10 +455,10 @@ class _RegisterInfo extends State {
this
.authService
.registerUser(request)
- .then((result) => {
- GifLoaderDialogUtils.hideDialog(context),
+ .then((result) async => {
if (result is String)
{
+ GifLoaderDialogUtils.hideDialog(context),
new ConfirmDialog(
context: context,
confirmMessage: result,
@@ -480,14 +480,14 @@ class _RegisterInfo extends State {
sharedPref.remove(FAMILY_FILE),
result.list.isFamily = false,
- sharedPref.setString(BLOOD_TYPE, result.patientBloodType ?? ""),
+ await sharedPref.setString(BLOOD_TYPE, result.patientBloodType ?? ""),
authenticatedUserObject.user = result.list,
projectViewModel.setPrivilege(privilegeList: res),
- sharedPref.setObject(MAIN_USER, result.list),
- sharedPref.setObject(USER_PROFILE, result.list),
+ await sharedPref.setObject(MAIN_USER, result.list),
+ await sharedPref.setObject(USER_PROFILE, result.list),
- sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
- sharedPref.setString(TOKEN, result.authenticationTokenID),
+ await sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
+ await sharedPref.setString(TOKEN, result.authenticationTokenID),
AppToast.showSuccessToast(message: TranslationBase.of(context).successRegister),
checkIfUserAgreedBefore(result),
projectViewModel.analytics.loginRegistration.registration_confirmation()
@@ -695,6 +695,7 @@ class _RegisterInfo extends State {
insertIMEI() async {
var selectedOption = await sharedPref.getInt(LAST_LOGIN);
authService.insertDeviceImei(selectedOption).then((value) => {goToHome()}).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
@@ -705,45 +706,70 @@ class _RegisterInfo extends State {
projectViewModel.isLogin = true;
projectViewModel.user = authenticatedUserObject.user;
await authenticatedUserObject.getUser(getUser: true);
- int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2;
- appointmentRateViewModel.getIsLastAppointmentRatedList(languageID).then((value) {
- getToDoCount();
- GifLoaderDialogUtils.hideDialog(AppGlobal.context);
- if (appointmentRateViewModel.isHaveAppointmentNotRate) {
- Navigator.pushAndRemoveUntil(
+ getToDoCount();
+ GifLoaderDialogUtils.hideDialog(AppGlobal.context);
+ ConfirmDialog dialog = new ConfirmDialog(
+ context: context,
+ confirmMessage: TranslationBase.of(context).validInsurance,
+ okText: TranslationBase.of(context).yes,
+ cancelText: TranslationBase.of(context).no,
+ okFunction: () {
+ ConfirmDialog.closeAlertDialog(context);
+ Navigator.pushAndRemoveUntil(
context,
- FadePage(
- page: RateAppointmentDoctor(isFromRegistration: true),
- ),
- (r) => false);
- } else {
- ConfirmDialog dialog = new ConfirmDialog(
- context: context,
- confirmMessage: TranslationBase.of(context).validInsurance,
- okText: TranslationBase.of(context).yes,
- cancelText: TranslationBase.of(context).no,
- okFunction: () {
- ConfirmDialog.closeAlertDialog(context);
- Navigator.pushAndRemoveUntil(
- context,
- MaterialPageRoute(builder: (context) => LandingPage()),
+ MaterialPageRoute(builder: (context) => LandingPage()),
(Route route) => false,
- );
- Navigator.push(context, FadePage(page: InsuranceUpdate()));
- },
- cancelFunction: () {
- Navigator.pushAndRemoveUntil(
- context,
- MaterialPageRoute(builder: (context) => LandingPage()),
- (Route route) => false,
- );
- });
- dialog.showAlertDialog(context);
- }
- }).catchError((err) {
- print(err);
- //GifLoaderDialogUtils.hideDialog(context);
- });
+ );
+ Navigator.push(context, FadePage(page: InsuranceUpdate()));
+ },
+ cancelFunction: () {
+ Navigator.pushAndRemoveUntil(
+ context,
+ MaterialPageRoute(builder: (context) => LandingPage()),
+ (Route route) => false,
+ );
+ });
+ dialog.showAlertDialog(context);
+
+ // int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2;
+ // appointmentRateViewModel.getIsLastAppointmentRatedList(languageID).then((value) {
+ // getToDoCount();
+ // GifLoaderDialogUtils.hideDialog(AppGlobal.context);
+ // if (appointmentRateViewModel.isHaveAppointmentNotRate) {
+ // Navigator.pushAndRemoveUntil(
+ // context,
+ // FadePage(
+ // page: RateAppointmentDoctor(isFromRegistration: true),
+ // ),
+ // (r) => false);
+ // } else {
+ // ConfirmDialog dialog = new ConfirmDialog(
+ // context: context,
+ // confirmMessage: TranslationBase.of(context).validInsurance,
+ // okText: TranslationBase.of(context).yes,
+ // cancelText: TranslationBase.of(context).no,
+ // okFunction: () {
+ // ConfirmDialog.closeAlertDialog(context);
+ // Navigator.pushAndRemoveUntil(
+ // context,
+ // MaterialPageRoute(builder: (context) => LandingPage()),
+ // (Route route) => false,
+ // );
+ // Navigator.push(context, FadePage(page: InsuranceUpdate()));
+ // },
+ // cancelFunction: () {
+ // Navigator.pushAndRemoveUntil(
+ // context,
+ // MaterialPageRoute(builder: (context) => LandingPage()),
+ // (Route route) => false,
+ // );
+ // });
+ // dialog.showAlertDialog(context);
+ // }
+ // }).catchError((err) {
+ // print(err);
+ // //GifLoaderDialogUtils.hideDialog(context);
+ // });
// SMSOTP.showLoadingDialog(context, false),
}
diff --git a/lib/pages/login/register.dart b/lib/pages/login/register.dart
index a010150d..2dd32163 100644
--- a/lib/pages/login/register.dart
+++ b/lib/pages/login/register.dart
@@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/analytics/flows/login_registration.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_user_status_reponse.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_user_status_req.dart';
@@ -25,6 +26,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart';
import 'package:intl/intl.dart' as intl;
+import 'package:provider/provider.dart';
class Register extends StatefulWidget {
final Function? changePageViewIndex;
@@ -297,8 +299,9 @@ class _Register extends State {
}
checkPatientForRegisteration(request) {
+ int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
- this.authService.checkPatientForRegisteration(request).then((response) => {checkUserStatus(response, request)}).catchError((err) {
+ this.authService.checkPatientForRegisteration(request, languageID).then((response) => {checkUserStatus(response, request)}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog dialog = new ConfirmDialog(
context: context,
diff --git a/lib/services/authentication/auth_provider.dart b/lib/services/authentication/auth_provider.dart
index 1a61ecca..4f4e6a1d 100644
--- a/lib/services/authentication/auth_provider.dart
+++ b/lib/services/authentication/auth_provider.dart
@@ -339,12 +339,12 @@ class AuthProvider with ChangeNotifier {
return authenticatedUser;
}
- Future checkPatientForRegisteration(CheckPatientForRegistration request) async {
+ Future checkPatientForRegisteration(CheckPatientForRegistration request, int languageID) async {
request.versionID = VERSION_ID;
request.channel = CHANNEL;
request.iPAdress = IP_ADDRESS;
request.generalid = GENERAL_ID;
- request.languageID = (languageID == 'ar' ? 1 : 2);
+ request.languageID = languageID;
request.deviceTypeID = Platform.isIOS ? 1 : 2;
request.isRegister = false;
// request.tokenID = '';
@@ -410,6 +410,1282 @@ class AuthProvider with ChangeNotifier {
dynamic localRes;
try {
+ // localRes = {
+ // "Date": null,
+ // "LanguageID": 0,
+ // "ServiceName": 0,
+ // "Time": null,
+ // "AndroidLink": null,
+ // "AuthenticationTokenID": "d+TXwG6BFkSjRuFPvTdSwA==",
+ // "Data": null,
+ // "Dataw": false,
+ // "DietType": 0,
+ // "DietTypeID": 0,
+ // "ErrorCode": null,
+ // "ErrorEndUserMessage": "Patient verified Successfully",
+ // "ErrorEndUserMessageN": null,
+ // "ErrorMessage": null,
+ // "ErrorStatusCode": 0,
+ // "ErrorType": 0,
+ // "FoodCategory": 0,
+ // "IOSLink": null,
+ // "IsAuthenticated": true,
+ // "MealOrderStatus": 0,
+ // "MealType": 0,
+ // "MessageStatus": 1,
+ // "NumberOfResultRecords": 0,
+ // "PatientBlodType": null,
+ // "SuccessMsg": null,
+ // "SuccessMsgN": null,
+ // "VidaUpdatedResponse": null,
+ // "DoctorInformation_List": null,
+ // "GetAllPendingRecordsList": null,
+ // "GetAllSharedRecordsByStatusList": null,
+ // "GetResponseFileList": null,
+ // "IsHMGPatient": false,
+ // "IsLoginSuccessfully": false,
+ // "IsNeedUpdateIdintificationNo": false,
+ // "IsPatientAuthorized": false,
+ // "IsVidaPlus": false,
+ // "KioskSendSMS": false,
+ // "List": [
+ // {
+ // "SetupID": "010266",
+ // "PatientType": 1,
+ // "PatientID": 5318335,
+ // "FirstName": "SYED TAHA",
+ // "MiddleName": "ALAM",
+ // "LastName": "ALAM",
+ // "FirstNameN": "سيد طه",
+ // "MiddleNameN": "علام",
+ // "LastNameN": "علام",
+ // "RelationshipID": 0,
+ // "Gender": 1,
+ // "DateofBirth": "/Date(839106000000+0300)/",
+ // "DateofBirthN": null,
+ // "NationalityID": "PAK",
+ // "PhoneResi": " ",
+ // "PhoneOffice": " ",
+ // "MobileNumber": "0560960398",
+ // "FaxNumber": " ",
+ // "EmailAddress": "testtaha@gmail.com",
+ // "BloodGroup": null,
+ // "RHFactor": null,
+ // "IsEmailAlertRequired": false,
+ // "IsSMSAlertRequired": true,
+ // "PreferredLanguage": "1",
+ // "IsPrivilegedMember": false,
+ // "MemberID": null,
+ // "ExpiryDate": null,
+ // "IsHmgEmployee": null,
+ // "EmployeeID": null,
+ // "EmergencyContactName": "",
+ // "EmergencyContactNo": "",
+ // "PatientPayType": 0,
+ // "DHCCPatientRefID": null,
+ // "IsPatientDummy": false,
+ // "Status": 2,
+ // "IsStatusCleared": null,
+ // "PatientIdentificationType": 2,
+ // "PatientIdentificationNo": "2579628724",
+ // "ProjectID": 15,
+ // "InfoSourceID": 0,
+ // "Address": "",
+ // "Age": 28,
+ // "AgeDesc": "28 Yr",
+ // "AreaID": 0,
+ // "CRSVerificationStatus": 2,
+ // "CRSVerificationStatusDesc": "verified",
+ // "CRSVerificationStatusDescN": "تم التوثيق",
+ // "CreatedBy": 0,
+ // "GenderDescription": "Male",
+ // "HealthIDFromNHICViaVida": "2bcc1b1a-96b7-4f33-86e2-fa955d0e3764",
+ // "IR": null,
+ // "ISOCityID": null,
+ // "ISOCountryID": null,
+ // "IsVerfiedFromNHIC": true,
+ // "ListPrivilege": [
+ // {
+ // "ID": 1,
+ // "ServiceName": "Notifications",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 2,
+ // "ServiceName": "Family Files",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 3,
+ // "ServiceName": "Settings",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 4,
+ // "ServiceName": "My Profile",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 5,
+ // "ServiceName": "My Appointment",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 6,
+ // "ServiceName": "My Doctors",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 7,
+ // "ServiceName": "Radiology",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 8,
+ // "ServiceName": "Radiology Email",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 9,
+ // "ServiceName": "Radiology View Image",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 10,
+ // "ServiceName": "Lab Results",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 11,
+ // "ServiceName": "Lab Results Email",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 12,
+ // "ServiceName": "Precriptions",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 13,
+ // "ServiceName": "Precriptions Email",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 14,
+ // "ServiceName": "Eye Measurments",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 15,
+ // "ServiceName": "Eye Measurments Email",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 16,
+ // "ServiceName": "Sick Leaves",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 17,
+ // "ServiceName": "Sick Leaves Email",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 18,
+ // "ServiceName": "Approvals",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 19,
+ // "ServiceName": "Monthly Reports",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 20,
+ // "ServiceName": "Request Medical Report",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 21,
+ // "ServiceName": "Request Medical Report Email",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 22,
+ // "ServiceName": "Insurance Cards",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 23,
+ // "ServiceName": "Allergies",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 24,
+ // "ServiceName": "My Trackers",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 25,
+ // "ServiceName": "Vital Signs",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 26,
+ // "ServiceName": "My Vaccines",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 27,
+ // "ServiceName": "My Vaccines Email",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 28,
+ // "ServiceName": "Ask Doctors",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 29,
+ // "ServiceName": "Live Chat",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 30,
+ // "ServiceName": "Health Data",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 31,
+ // "ServiceName": "Online Check-in",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 32,
+ // "ServiceName": "Connect to internet",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 33,
+ // "ServiceName": "Advance Payment",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 34,
+ // "ServiceName": "Book Appointment",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 35,
+ // "ServiceName": "Child Vaccines",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 36,
+ // "ServiceName": "Blood Donation",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 38,
+ // "ServiceName": "H2O",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 40,
+ // "ServiceName": "ChatBot",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 41,
+ // "ServiceName": "Parking",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 42,
+ // "ServiceName": "SymptomChecker",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 47,
+ // "ServiceName": "AdvanceBalance",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 48,
+ // "ServiceName": "ActiveMedications",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 49,
+ // "ServiceName": "VaccineAvailability",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 51,
+ // "ServiceName": "UpcomingAppointment",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 52,
+ // "ServiceName": "PushNotificationCount",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 53,
+ // "ServiceName": "ActiveMedicationCount",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 54,
+ // "ServiceName": "LabOrderUnreadCount",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 55,
+ // "ServiceName": "RadOrderUnreadCount",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 56,
+ // "ServiceName": "MedicalReportUnreadCount",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 57,
+ // "ServiceName": "ERWaittingTimeShowing",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 58,
+ // "ServiceName": "OnlinePayment",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 59,
+ // "ServiceName": "RadiologyDisplayImage",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 60,
+ // "ServiceName": "EmergencyConsultation",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 61,
+ // "ServiceName": "PatientQueueCall",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 62,
+ // "ServiceName": "OnlinePrescriptionOrder",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 63,
+ // "ServiceName": "Transportations",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 64,
+ // "ServiceName": "HomeHealthCareService",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 65,
+ // "ServiceName": "Al-HabibPharmacyOnline",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 66,
+ // "ServiceName": "Al-HabibOffers",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 67,
+ // "ServiceName": "ComprehensiveMedicalCheckup",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 68,
+ // "ServiceName": "RRT",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 72,
+ // "ServiceName": "CancelLiveCareRequest",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 74,
+ // "ServiceName": "Exacart",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 76,
+ // "ServiceName": "Covid19-CarThrow",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 77,
+ // "ServiceName": "VoiceBot",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 78,
+ // "ServiceName": "LiveCareBookOnDoctorSchedule",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 79,
+ // "ServiceName": "CheckIn_QR",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 80,
+ // "ServiceName": "CheckIn_NFC",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 81,
+ // "ServiceName": "ED",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 82,
+ // "ServiceName": "Packages_&_Offers",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 83,
+ // "ServiceName": "Lakum_Points",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 84,
+ // "ServiceName": "QR_Reader",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 85,
+ // "ServiceName": "AncillaryOrders",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 86,
+ // "ServiceName": "Payment-MADA",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 87,
+ // "ServiceName": "Payment-VISA",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 88,
+ // "ServiceName": "Payment-MasterCard",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 89,
+ // "ServiceName": "Payment-ApplePay",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 90,
+ // "ServiceName": "Payment-Tamara",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 91,
+ // "ServiceName": "Payment-Installment",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 92,
+ // "ServiceName": "ED-Checkin",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 93,
+ // "ServiceName": "NetworkDebug",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 94,
+ // "ServiceName": "TamaraAncillary",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 95,
+ // "ServiceName": "Verif-Face",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 96,
+ // "ServiceName": "Verif-Finger",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 97,
+ // "ServiceName": "Verif-SMS",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 98,
+ // "ServiceName": "Verif-WhatsApp",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 99,
+ // "ServiceName": "PharmacyLivecare",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 100,
+ // "ServiceName": "ePharmacy",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 102,
+ // "ServiceName": "CheckIn_Geofence",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 103,
+ // "ServiceName": "Payment-ApplePay-Web",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 104,
+ // "ServiceName": "Livecare_Zoom",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 105,
+ // "ServiceName": "Dental Virtual Tour",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 106,
+ // "ServiceName": "Dental Medical Instructions",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 107,
+ // "ServiceName": "Navigation Service",
+ // "Previlege": false,
+ // "Region": null
+ // }
+ // ],
+ // "Marital": null,
+ // "OutSA": 0,
+ // "POBox": "",
+ // "ReceiveHealthSummaryReport": false,
+ // "SourceType": 0,
+ // "StrDateofBirth": null,
+ // "TempAddress": "",
+ // "ZipCode": "",
+ // "eHealthIDField": null,
+ // "patientPayType": null,
+ // "patientType": null,
+ // "status": null
+ // }
+ // ],
+ // "List_AskHabibMobileLoginInfo": null,
+ // "List_AskHabibPatientFile": null,
+ // "List_FamilyRelationships": null,
+ // "List_MergeFiles": null,
+ // "List_MobileLoginInfo": null,
+ // "List_PatientCount": null,
+ // "LogInTokenID": null,
+ // "MohemmPrivilege_List": null,
+ // "PateintID": 5318335,
+ // "PatientBloodType": "",
+ // "PatientER_AdminDriverFileList": null,
+ // "PatientER_AdminFile": null,
+ // "PatientER_DriverFile": null,
+ // "PatientER_DriverFileList": null,
+ // "PatientHasFile": false,
+ // "PatientMergedIDs": null,
+ // "PatientOutSA": false,
+ // "PatientShareRequestID": 0,
+ // "PatientType": 0,
+ // "ProjectIDOut": 0,
+ // "ReturnMessage": null,
+ // "SMSLoginRequired": false,
+ // "ServicePrivilege_List": [
+ // {
+ // "ID": 1,
+ // "ServiceName": "Notifications",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 2,
+ // "ServiceName": "Family Files",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 3,
+ // "ServiceName": "Settings",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 4,
+ // "ServiceName": "My Profile",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 5,
+ // "ServiceName": "My Appointment",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 6,
+ // "ServiceName": "My Doctors",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 7,
+ // "ServiceName": "Radiology",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 8,
+ // "ServiceName": "Radiology Email",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 9,
+ // "ServiceName": "Radiology View Image",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 10,
+ // "ServiceName": "Lab Results",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 11,
+ // "ServiceName": "Lab Results Email",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 12,
+ // "ServiceName": "Precriptions",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 13,
+ // "ServiceName": "Precriptions Email",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 14,
+ // "ServiceName": "Eye Measurments",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 15,
+ // "ServiceName": "Eye Measurments Email",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 16,
+ // "ServiceName": "Sick Leaves",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 17,
+ // "ServiceName": "Sick Leaves Email",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 18,
+ // "ServiceName": "Approvals",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 19,
+ // "ServiceName": "Monthly Reports",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 20,
+ // "ServiceName": "Request Medical Report",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 21,
+ // "ServiceName": "Request Medical Report Email",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 22,
+ // "ServiceName": "Insurance Cards",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 23,
+ // "ServiceName": "Allergies",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 24,
+ // "ServiceName": "My Trackers",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 25,
+ // "ServiceName": "Vital Signs",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 26,
+ // "ServiceName": "My Vaccines",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 27,
+ // "ServiceName": "My Vaccines Email",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 28,
+ // "ServiceName": "Ask Doctors",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 29,
+ // "ServiceName": "Live Chat",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 30,
+ // "ServiceName": "Health Data",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 31,
+ // "ServiceName": "Online Check-in",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 32,
+ // "ServiceName": "Connect to internet",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 33,
+ // "ServiceName": "Advance Payment",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 34,
+ // "ServiceName": "Book Appointment",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 35,
+ // "ServiceName": "Child Vaccines",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 36,
+ // "ServiceName": "Blood Donation",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 38,
+ // "ServiceName": "H2O",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 40,
+ // "ServiceName": "ChatBot",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 41,
+ // "ServiceName": "Parking",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 42,
+ // "ServiceName": "SymptomChecker",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 47,
+ // "ServiceName": "AdvanceBalance",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 48,
+ // "ServiceName": "ActiveMedications",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 49,
+ // "ServiceName": "VaccineAvailability",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 51,
+ // "ServiceName": "UpcomingAppointment",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 52,
+ // "ServiceName": "PushNotificationCount",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 53,
+ // "ServiceName": "ActiveMedicationCount",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 54,
+ // "ServiceName": "LabOrderUnreadCount",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 55,
+ // "ServiceName": "RadOrderUnreadCount",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 56,
+ // "ServiceName": "MedicalReportUnreadCount",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 57,
+ // "ServiceName": "ERWaittingTimeShowing",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 58,
+ // "ServiceName": "OnlinePayment",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 59,
+ // "ServiceName": "RadiologyDisplayImage",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 60,
+ // "ServiceName": "EmergencyConsultation",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 61,
+ // "ServiceName": "PatientQueueCall",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 62,
+ // "ServiceName": "OnlinePrescriptionOrder",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 63,
+ // "ServiceName": "Transportations",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 64,
+ // "ServiceName": "HomeHealthCareService",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 65,
+ // "ServiceName": "Al-HabibPharmacyOnline",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 66,
+ // "ServiceName": "Al-HabibOffers",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 67,
+ // "ServiceName": "ComprehensiveMedicalCheckup",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 68,
+ // "ServiceName": "RRT",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 72,
+ // "ServiceName": "CancelLiveCareRequest",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 74,
+ // "ServiceName": "Exacart",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 76,
+ // "ServiceName": "Covid19-CarThrow",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 77,
+ // "ServiceName": "VoiceBot",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 78,
+ // "ServiceName": "LiveCareBookOnDoctorSchedule",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 79,
+ // "ServiceName": "CheckIn_QR",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 80,
+ // "ServiceName": "CheckIn_NFC",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 81,
+ // "ServiceName": "ED",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 82,
+ // "ServiceName": "Packages_&_Offers",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 83,
+ // "ServiceName": "Lakum_Points",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 84,
+ // "ServiceName": "QR_Reader",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 85,
+ // "ServiceName": "AncillaryOrders",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 86,
+ // "ServiceName": "Payment-MADA",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 87,
+ // "ServiceName": "Payment-VISA",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 88,
+ // "ServiceName": "Payment-MasterCard",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 89,
+ // "ServiceName": "Payment-ApplePay",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 90,
+ // "ServiceName": "Payment-Tamara",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 91,
+ // "ServiceName": "Payment-Installment",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 92,
+ // "ServiceName": "ED-Checkin",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 93,
+ // "ServiceName": "NetworkDebug",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 94,
+ // "ServiceName": "TamaraAncillary",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 95,
+ // "ServiceName": "Verif-Face",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 96,
+ // "ServiceName": "Verif-Finger",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 97,
+ // "ServiceName": "Verif-SMS",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 98,
+ // "ServiceName": "Verif-WhatsApp",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 99,
+ // "ServiceName": "PharmacyLivecare",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 100,
+ // "ServiceName": "ePharmacy",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 102,
+ // "ServiceName": "CheckIn_Geofence",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 103,
+ // "ServiceName": "Payment-ApplePay-Web",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 104,
+ // "ServiceName": "Livecare_Zoom",
+ // "Previlege": false,
+ // "Region": null
+ // },
+ // {
+ // "ID": 105,
+ // "ServiceName": "Dental Virtual Tour",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 106,
+ // "ServiceName": "Dental Medical Instructions",
+ // "Previlege": true,
+ // "Region": null
+ // },
+ // {
+ // "ID": 107,
+ // "ServiceName": "Navigation Service",
+ // "Previlege": false,
+ // "Region": null
+ // }
+ // ],
+ // "SharePatientName": null,
+ // "UserAccountIsActivated": false,
+ // "VerificationCode": null,
+ // "email": null,
+ // "errorList": null,
+ // "hasFile": false,
+ // "isActiveCode": false,
+ // "isMerged": false,
+ // "isNeedUserAgreement": false,
+ // "isSMSSent": false,
+ // "memberList": null,
+ // "message": "Patient Registered Successfully",
+ // "statusCode": 1
+ // };
await new BaseAppClient().post(REGISTER_USER, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
@@ -458,7 +1734,7 @@ class AuthProvider with ChangeNotifier {
Request req = appGlobal.getPublicRequest();
request = {
- "PatientOutSA": zipCode == '+966' ? 0 : 1,
+ "PatientOutSA": zipCode == '966' ? 0 : 1,
"PatientMobileNumber": mobileNo,
"SearchType": 2,
"ZipCode": zipCode,
diff --git a/lib/uitl/penguin_method_channel.dart b/lib/uitl/penguin_method_channel.dart
index cf131645..12421f5e 100644
--- a/lib/uitl/penguin_method_channel.dart
+++ b/lib/uitl/penguin_method_channel.dart
@@ -7,15 +7,13 @@ class PenguinMethodChannel {
try {
await _channel.invokeMethod('launchPenguin', {
"storyboardName": storyboardName,
- "baseURL": "https://hmg.nav.penguinin.com",
+ "baseURL": "https://prod.hmg.nav.penguinin.com",
// "dataURL": "https://hmg.nav.penguinin.com",
// "positionURL": "https://hmg.nav.penguinin.com",
// "dataURL": "https://hmg-v33.local.penguinin.com",
// "positionURL": "https://hmg-v33.local.penguinin.com",
-
"dataURL": "https://prod.hmg.nav.penguinin.com",
"positionURL": "https://prod.hmg.nav.penguinin.com",
-
"dataServiceName": "api",
"positionServiceName": "pe",
"clientID": "HMG",
diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart
index 93a4a0e0..6c99b2c6 100644
--- a/lib/widgets/in_app_browser/InAppBrowser.dart
+++ b/lib/widgets/in_app_browser/InAppBrowser.dart
@@ -38,9 +38,9 @@ class MyInAppBrowser extends InAppBrowser {
static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT
- static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
+ // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
- // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
+ static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS
diff --git a/pubspec.yaml b/pubspec.yaml
index e98c0152..cd45272f 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,7 +1,7 @@
name: diplomaticquarterapp
description: A new Flutter application.
-version: 4.5.063+4050063
+version: 4.5.065+4050065
environment:
sdk: ">=3.0.0 <3.13.0"
@@ -99,7 +99,7 @@ dependencies:
flutter_rating_bar: ^4.0.1
# Calendar
-# syncfusion_flutter_calendar: ^23.1.42
+ # syncfusion_flutter_calendar: ^23.1.42
syncfusion_flutter_calendar: ^24.1.47
# SVG Images
@@ -138,6 +138,8 @@ dependencies:
carousel_slider: ^5.0.0
#Dependencies for video call implementation
native_device_orientation: ^1.0.0
+# wakelock: ^0.6.2
+ wakelock_plus: ^1.1.4
after_layout: ^1.1.0
cached_network_image: ^3.3.0
flutter_tts: ^3.6.1