diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index def0f5e2..98d49db1 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -92,8 +92,8 @@ class DoctorsListService extends BaseService { Future getDoctorsListByName(String docName, int languageID, BuildContext context) async { Map request; - late double lat; - late double long; + late double lat = 0.0; + late double long = 0.0; if (await this.sharedPref.getObject(USER_PROFILE) != null) { var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 9ffec736..4700d068 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -218,7 +218,7 @@ class MyInAppBrowser extends InAppBrowser { tamaraRequestModel.customerName = patientName; tamaraRequestModel.fileNumber = patientID.toString(); tamaraRequestModel.patientOutSA = authenticatedUser.outSA == 1 ? true : false; - tamaraRequestModel.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); + tamaraRequestModel.deviceToken = await AppSharedPreferences().getStringWithDefaultValue(PUSH_TOKEN, ""); tamaraRequestModel.latitude = this.lat.toString(); tamaraRequestModel.longitude = this.long.toString(); tamaraRequestModel.serviceID = servID; @@ -290,8 +290,8 @@ class MyInAppBrowser extends InAppBrowser { form = form.replaceFirst('PATIENT_TYPE_ID', patientData == null ? patientType.toString() : "1"); Platform.isIOS - ? form = form.replaceFirst('DEVICE_TOKEN', await AppSharedPreferences().getString(PUSH_TOKEN) + "," + await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN)) - : form = form.replaceFirst('DEVICE_TOKEN', await sharedPref.getString(PUSH_TOKEN) ?? ""); + ? form = form.replaceFirst('DEVICE_TOKEN', await AppSharedPreferences().getStringWithDefaultValue(PUSH_TOKEN, "") + "," + await AppSharedPreferences().getStringWithDefaultValue(ONESIGNAL_APNS_TOKEN, "")) + : form = form.replaceFirst('DEVICE_TOKEN', await sharedPref.getStringWithDefaultValue(PUSH_TOKEN, "") ?? ""); // form = form.replaceFirst('DEVICE_TOKEN', await AppSharedPreferences().getString(PUSH_TOKEN) + "," + await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN)); // form = form.replaceFirst('DEVICE_TOKEN', await sharedPref.getString(PUSH_TOKEN));