Updates & fixes

merge-requests/599/merge
haroon amjad 4 years ago
parent 8d988ba994
commit c3538ebdb6

@ -9,7 +9,7 @@ import 'package:diplomaticquarterapp/analytics/flows/offers_promotions.dart';
import 'package:diplomaticquarterapp/analytics/flows/todo_list.dart'; import 'package:diplomaticquarterapp/analytics/flows/todo_list.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/services/permission/permission_service.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:firebase_analytics/firebase_analytics.dart'; import 'package:firebase_analytics/firebase_analytics.dart';
@ -22,59 +22,56 @@ import 'package:geolocator/geolocator.dart';
import 'flows/app_nav.dart'; import 'flows/app_nav.dart';
import 'flows/hmg_services.dart'; import 'flows/hmg_services.dart';
typedef GALogger = Function(String name, {Map<String, dynamic> parameters});
typedef GALogger = Function(String name, {Map<String,dynamic> parameters});
var _analytics = FirebaseAnalytics(); var _analytics = FirebaseAnalytics();
_logger(String name, {Map<String,dynamic> parameters}) async {
_logger(String name, {Map<String, dynamic> parameters}) async {
if (name != null && name.isNotEmpty) { if (name != null && name.isNotEmpty) {
if(name.contains(' ')) if (name.contains(' ')) name = name.replaceAll(' ', '_');
name = name.replaceAll(' ','_');
// To LowerCase // To LowerCase
if(parameters != null && parameters.isNotEmpty) if (parameters != null && parameters.isNotEmpty)
parameters = parameters.map((key, value) { parameters = parameters.map((key, value) {
final key_ = key.toLowerCase(); final key_ = key.toLowerCase();
var value_ = value; var value_ = value;
if(value is String) if (value is String) value_ = value.toLowerCase();
value_ = value.toLowerCase();
return MapEntry(key_, value_); return MapEntry(key_, value_);
}); });
try{ try {
_analytics _analytics.logEvent(name: name.trim().toLowerCase(), parameters: parameters).then((value) {
.logEvent(name: name.trim().toLowerCase(), parameters: parameters)
.then((value) {
debugPrint('SUCCESS: Google analytics event "$name" sent with parameters $parameters'); debugPrint('SUCCESS: Google analytics event "$name" sent with parameters $parameters');
}).catchError((error) { }).catchError((error) {
debugPrint('ERROR: Google analytics event "$name" sent failed'); debugPrint('ERROR: Google analytics event "$name" sent failed');
}); });
}catch(e){ } catch (e) {
print(e); print(e);
} }
} }
} }
class GAnalytics { class GAnalytics {
static String TREATMENT_TYPE; static String TREATMENT_TYPE;
static String APPOINTMENT_DETAIL_FLOW_TYPE; static String APPOINTMENT_DETAIL_FLOW_TYPE;
static String PAYMENT_TYPE; static String PAYMENT_TYPE;
setUser(AuthenticatedUser user) async{ setUser(AuthenticatedUser user) async {
try{ try {
_analytics.setUserProperty(name: 'user_language', value: user.preferredLanguage == '1' ? 'arabic' : 'english'); _analytics.setUserProperty(name: 'user_language', value: user.preferredLanguage == '1' ? 'arabic' : 'english');
_analytics.setUserProperty(name: 'userid', value: Utils.generateMd5Hash(user.emailAddress)); _analytics.setUserProperty(name: 'userid', value: Utils.generateMd5Hash(user.emailAddress));
_analytics.setUserProperty(name: 'login_status', value: user == null ? 'guest' : 'loggedin'); _analytics.setUserProperty(name: 'login_status', value: user == null ? 'guest' : 'loggedin');
if (await PermissionService.isLocationEnabled()) {
final location = await Geolocator.getCurrentPosition(); final location = await Geolocator.getCurrentPosition();
if(location != null && !location.isMocked){ if (location != null && !location.isMocked) {
final places = await placemarkFromCoordinates(location.latitude, location.longitude, localeIdentifier: 'en_US'); final places = await placemarkFromCoordinates(location.latitude, location.longitude, localeIdentifier: 'en_US');
final countryCode = places.first.isoCountryCode; final countryCode = places.first.isoCountryCode;
_analytics.setUserProperty(name: 'user_country', value: countryCode); _analytics.setUserProperty(name: 'user_country', value: countryCode);
} }
}catch(e){ } else {
_analytics.setUserProperty(name: 'user_country', value: "N/A");
} }
} catch (e) {}
} }
NavObserver navObserver() => NavObserver(); NavObserver navObserver() => NavObserver();
@ -90,18 +87,13 @@ class GAnalytics {
final errorTracking = ErrorTracking(_logger); final errorTracking = ErrorTracking(_logger);
} }
// adb shell setprop debug.firebase.analytics.app com.ejada.hmg -> Android // adb shell setprop debug.firebase.analytics.app com.ejada.hmg -> Android
class NavObserver extends RouteObserver<PageRoute<dynamic>> { class NavObserver extends RouteObserver<PageRoute<dynamic>> {
_sendScreenView(PageRoute route) async { _sendScreenView(PageRoute route) async {
log(String className) { log(String className) {
var event = AnalyticEvents.get(className); var event = AnalyticEvents.get(className);
if (event.active != null) { if (event.active != null) {
_analytics _analytics.setCurrentScreen(screenName: event.flutterName(), screenClassOverride: className).catchError(
.setCurrentScreen(
screenName: event.flutterName(), screenClassOverride: className)
.catchError(
(Object error) { (Object error) {
print('$FirebaseAnalyticsObserver: $error'); print('$FirebaseAnalyticsObserver: $error');
}, },
@ -112,9 +104,7 @@ class NavObserver extends RouteObserver<PageRoute<dynamic>> {
} }
} }
if (route.settings.name != null && if (route.settings.name != null && route.settings.name.isNotEmpty && route.settings.name != "null") {
route.settings.name.isNotEmpty &&
route.settings.name != "null") {
var class_ = routes[route.settings.name](0); var class_ = routes[route.settings.name](0);
if (class_ != null) log(class_.toStringShort()); if (class_ != null) log(class_.toStringShort());
} else if (route is FadePage) { } else if (route is FadePage) {

@ -395,7 +395,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnar
var CHANNEL = 3; var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 7.7; var VERSION_ID = 7.8;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
var PATIENT_OUT_SA = 0; var PATIENT_OUT_SA = 0;

@ -268,7 +268,7 @@ const Map localizedValues = {
"myMedicalFileSubTitle": {"en": "All your medical records", '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': 'الصيدلية الإلكترونية'},
"EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'}, "EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'},
"OnlinePaymentService": {"en": "Online Payment Service", 'ar': 'خدمة الدفع الإلكتروني'}, "OnlinePaymentService": {"en": "Online Payment Service", 'ar': 'خدمة الدفع الإلكتروني'},
"OffersAndPackages": {"en": "Online transfer request", 'ar': 'طلب التحويل الالكتروني'}, "OffersAndPackages": {"en": "Online transfer request", 'ar': 'طلب التحويل الالكتروني'},
@ -545,7 +545,7 @@ const Map localizedValues = {
"emergency": {"en": "Emergency", "ar": "الطوارئ"}, "emergency": {"en": "Emergency", "ar": "الطوارئ"},
"erservices": {"en": "Emergency", "ar": "الطوارئ"}, "erservices": {"en": "Emergency", "ar": "الطوارئ"},
"services2": {"en": "Services", "ar": "خدمات"}, "services2": {"en": "Services", "ar": "خدمات"},
"cantSeeProfile": {"en": "To view your medical profile, please log in or register now", "ar": "للتصفح ملفك الطبي الرجاء تسجيل الدخول أو التسجيل االن"}, "cantSeeProfile": {"en": "To view your medical profile, please log in or register now", "ar": "للتصفح ملفك الطبي الرجاء تسجيل الدخول أو التسجيل الآن"},
"loginRegisterNow": {"en": "Login or Register Now", "ar": "تسجيل الدخول أو التسجيل الآن"}, "loginRegisterNow": {"en": "Login or Register Now", "ar": "تسجيل الدخول أو التسجيل الآن"},
"HMGPharmacy": {"en": "HMG Pharmacy", "ar": "صيدلية HMG"}, "HMGPharmacy": {"en": "HMG Pharmacy", "ar": "صيدلية HMG"},
"ecommerceSolution": {"en": "Ecommerce Solution", "ar": "حل التجارة الإلكترونية"}, "ecommerceSolution": {"en": "Ecommerce Solution", "ar": "حل التجارة الإلكترونية"},

@ -137,11 +137,11 @@ class BaseAppClient {
body.removeWhere((key, value) => key == null || value == null); body.removeWhere((key, value) => key == null || value == null);
if (BASE_URL == "https://uat.hmgwebservices.com/") { // if (BASE_URL == "https://uat.hmgwebservices.com/") {
print("URL : $url"); print("URL : $url");
final jsonBody = json.encode(body); final jsonBody = json.encode(body);
print(jsonBody); print(jsonBody);
} // }
if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) {
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);

@ -1,11 +1,15 @@
import 'dart:async'; import 'dart:async';
import 'dart:io';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/permission/permission_service.dart';
import 'package:diplomaticquarterapp/theme/colors.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/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -16,6 +20,7 @@ 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:geocoding/geocoding.dart'; import 'package:geocoding/geocoding.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart'; import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -63,7 +68,8 @@ class _LocationPageState extends State<LocationPage> {
currentPostion = LatLng(widget.latitude, widget.longitude); currentPostion = LatLng(widget.latitude, widget.longitude);
latitude = widget.latitude; latitude = widget.latitude;
longitude = widget.longitude; longitude = widget.longitude;
setMap(); _getUserLocation();
// setMap();
setState(() {}); setState(() {});
}, },
onCameraIdle: () async { onCameraIdle: () async {
@ -139,81 +145,191 @@ class _LocationPageState extends State<LocationPage> {
// ], // ],
// ), // ),
PlacePicker( // PlacePicker(
apiKey: GOOGLE_API_KEY, // apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true, // enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false, // automaticallyImplyAppBarLeading: false,
autocompleteOnTrailingWhitespace: true, // autocompleteOnTrailingWhitespace: true,
selectInitialPosition: true, // selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage, // autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true, // enableMapTypeButton: true,
searchForInitialValue: false, // searchForInitialValue: false,
onPlacePicked: (PickResult result) { // onPlacePicked: (PickResult result) {
print(result.adrAddress); // print(result.adrAddress);
}, // },
selectedPlaceWidgetBuilder: (_, selectedPlace, state, isSearchBarFocused) { // selectedPlaceWidgetBuilder: (_, selectedPlace, state, isSearchBarFocused) {
return isSearchBarFocused // return isSearchBarFocused
? Container() // ? Container()
: FloatingCard( // : FloatingCard(
bottomPosition: 0.0, // bottomPosition: 0.0,
leftPosition: 0.0, // leftPosition: 0.0,
rightPosition: 0.0, // rightPosition: 0.0,
width: 500, // width: 500,
borderRadius: BorderRadius.circular(0.0), // borderRadius: BorderRadius.circular(0.0),
child: state == SearchingState.Searching // child: state == SearchingState.Searching
? SizedBox(height: 43, child: Center(child: CircularProgressIndicator())).insideContainer // ? SizedBox(height: 43, child: Center(child: CircularProgressIndicator())).insideContainer
: DefaultButton(TranslationBase.of(context).addNewAddress, () async { // : DefaultButton(TranslationBase.of(context).addNewAddress, () async {
AddNewAddressRequestModel addNewAddressRequestModel = new AddNewAddressRequestModel( // AddNewAddressRequestModel addNewAddressRequestModel = new AddNewAddressRequestModel(
customer: Customer(addresses: [ // customer: Customer(addresses: [
Addresses(
address1: selectedPlace.formattedAddress,
address2: selectedPlace.formattedAddress,
customerAttributes: "",
createdOnUtc: "",
id: "0",
faxNumber: "",
phoneNumber: projectViewModel.user.mobileNumber,
countryId: 69,
latLong: "$latitude,$longitude",
email: projectViewModel.user.emailAddress)
// Addresses( // Addresses(
// address1: selectedPlace.formattedAddress, // address1: selectedPlace.formattedAddress,
// address2: selectedPlace.formattedAddress, // address2: selectedPlace.formattedAddress,
// customerAttributes: "", // customerAttributes: "",
// city: "",
// createdOnUtc: "", // createdOnUtc: "",
// id: "0", // id: "0",
// latLong: "${selectedPlace.geometry.location}", // faxNumber: "",
// email: "") // phoneNumber: projectViewModel.user.mobileNumber,
]), // countryId: 69,
); // latLong: "$latitude,$longitude",
// email: projectViewModel.user.emailAddress)
// // Addresses(
// // address1: selectedPlace.formattedAddress,
// // address2: selectedPlace.formattedAddress,
// // customerAttributes: "",
// // city: "",
// // createdOnUtc: "",
// // id: "0",
// // latLong: "${selectedPlace.geometry.location}",
// // email: "")
// ]),
// );
//
// selectedPlace.addressComponents.forEach((e) {
// if (e.types.contains("country")) {
// addNewAddressRequestModel.customer.addresses[0].country = e.longName;
// }
// if (e.types.contains("postal_code")) {
// addNewAddressRequestModel.customer.addresses[0].zipPostalCode = e.longName;
// }
// if (e.types.contains("locality")) {
// addNewAddressRequestModel.customer.addresses[0].city = e.longName;
// }
// });
//
// await model.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel);
// if (model.state == ViewState.ErrorLocal) {
// Utils.showErrorToast(model.error);
// } else {
// AppToast.showSuccessToast(message: "Address Added Successfully");
// }
// Navigator.of(context).pop(addNewAddressRequestModel);
// }).insideContainer);
// },
// initialPosition: LatLng(latitude, longitude),
// useCurrentLocation: showCurrentLocation,
// ),
selectedPlace.addressComponents.forEach((e) { Expanded(
if (e.types.contains("country")) { child: Stack(
addNewAddressRequestModel.customer.addresses[0].country = e.longName; alignment: Alignment.center,
} children: [
if (e.types.contains("postal_code")) { if (appMap != null) appMap,
addNewAddressRequestModel.customer.addresses[0].zipPostalCode = e.longName; Container(
} margin: EdgeInsets.only(bottom: 50.0),
if (e.types.contains("locality")) { child: Icon(
addNewAddressRequestModel.customer.addresses[0].city = e.longName; Icons.place,
color: CustomColors.accentColor,
size: 50,
),
),
// FloatingCard(
// bottomPosition: 0.0,
// leftPosition: 0.0,
// rightPosition: 0.0,
// width: 500,
// borderRadius: BorderRadius.circular(0.0),
// // child: state == SearchingState.Searching
// // ? SizedBox(height: 43, child: Center(child: CircularProgressIndicator())).insideContainer
// // :
// child: DefaultButton(TranslationBase.of(context).addNewAddress, () async {
// AddNewAddressRequestModel addNewAddressRequestModel = new AddNewAddressRequestModel(
// customer: Customer(addresses: [
// // Addresses(
// // address1: selectedPlace.formattedAddress,
// // address2: selectedPlace.formattedAddress,
// // customerAttributes: "",
// // createdOnUtc: "",
// // id: "0",
// // faxNumber: "",
// // phoneNumber: projectViewModel.user.mobileNumber,
// // countryId: 69,
// // latLong: "$latitude,$longitude",
// // email: projectViewModel.user.emailAddress)
//
// // Addresses(
// // address1: selectedPlace.formattedAddress,
// // address2: selectedPlace.formattedAddress,
// // customerAttributes: "",
// // city: "",
// // createdOnUtc: "",
// // id: "0",
// // latLong: "${selectedPlace.geometry.location}",
// // email: "")
// ]),
// );
//
// // selectedPlace.addressComponents.forEach((e) {
// // if (e.types.contains("country")) {
// // addNewAddressRequestModel.customer.addresses[0].country = e.longName;
// // }
// // if (e.types.contains("postal_code")) {
// // addNewAddressRequestModel.customer.addresses[0].zipPostalCode = e.longName;
// // }
// // if (e.types.contains("locality")) {
// // addNewAddressRequestModel.customer.addresses[0].city = e.longName;
// // }
// // });
//
// await model.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel);
// if (model.state == ViewState.ErrorLocal) {
// Utils.showErrorToast(model.error);
// } else {
// AppToast.showSuccessToast(message: "Address Added Successfully");
// }
// Navigator.of(context).pop(addNewAddressRequestModel);
// }).insideContainer),
],
),
),
),
);
} }
});
await model.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel); void _getUserLocation() async {
if (model.state == ViewState.ErrorLocal) { if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) {
Utils.showErrorToast(model.error); var lat = await this.sharedPref.getDouble(USER_LAT);
var long = await this.sharedPref.getDouble(USER_LONG);
latitude = lat;
longitude = long;
currentPostion = LatLng(lat, long);
setMap();
} else { } else {
AppToast.showSuccessToast(message: "Address Added Successfully"); if (await PermissionService.isLocationEnabled()) {
Geolocator.getLastKnownPosition().then((value) {
latitude = value.latitude;
longitude = value.longitude;
currentPostion = LatLng(latitude, longitude);
setMap();
});
} else {
if (Platform.isAndroid) {
Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () {
Geolocator.getLastKnownPosition().then((value) {
latitude = value.latitude;
longitude = value.longitude;
currentPostion = LatLng(latitude, longitude);
setMap();
});
});
} else {
Geolocator.getLastKnownPosition().then((value) {
latitude = value.latitude;
longitude = value.longitude;
setMap();
});
}
}
} }
Navigator.of(context).pop(addNewAddressRequestModel);
}).insideContainer);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: showCurrentLocation,
),
),
);
} }
setMap() { setMap() {
@ -227,6 +343,7 @@ class _LocationPageState extends State<LocationPage> {
} }
void _updatePosition(CameraPosition _position) { void _updatePosition(CameraPosition _position) {
print(_position);
latitude = _position.target.latitude; latitude = _position.target.latitude;
longitude = _position.target.longitude; longitude = _position.target.longitude;
} }

@ -382,7 +382,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
makePayment() { makePayment() {
showDraggableDialog(context, PaymentMethod( showDraggableDialog(context, PaymentMethod(
onSelectedMethod: (String method) { onSelectedMethod: (String method, [String selectedInstallmentPlan]) {
selectedPaymentMethod = method; selectedPaymentMethod = method;
print(selectedPaymentMethod); print(selectedPaymentMethod);
openPayment(selectedPaymentMethod, projectViewModel.authenticatedUserObject.user, double.parse(getTotalValue()), null); openPayment(selectedPaymentMethod, projectViewModel.authenticatedUserObject.user, double.parse(getTotalValue()), null);

@ -1,397 +0,0 @@
// import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
// import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
// import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
// import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
// import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart';
// import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
// import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
// import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
// import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
// import 'package:diplomaticquarterapp/pages/base/base_view.dart';
// import 'package:diplomaticquarterapp/pages/medical/balance/dialogs/SelectHospitalDialog.dart';
// import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
// import 'package:diplomaticquarterapp/uitl/app_toast.dart';
// import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
// import 'package:diplomaticquarterapp/uitl/utils.dart';
// import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
// import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
// import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
// import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
// import 'package:flutter/cupertino.dart';
// import 'package:flutter/material.dart';
// import 'package:smart_progress_bar/smart_progress_bar.dart';
//
// //import '../../../core/model/my_balance/AdvanceModel.dart';
// import 'confirm_payment_page.dart';
// import 'dialogs/SelectBeneficiaryDialog.dart';
// import 'dialogs/SelectPatientFamilyDialog.dart';
// import 'dialogs/SelectPatientInfoDialog.dart';
// import 'new_text_Field.dart';
//
// enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON }
//
// class AdvancePaymentPage extends StatefulWidget {
// @override
// _AdvancePaymentPageState createState() => _AdvancePaymentPageState();
// }
//
// class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
// TextEditingController _fileTextController = TextEditingController();
// TextEditingController _notesTextController = TextEditingController();
// BeneficiaryType beneficiaryType = BeneficiaryType.NON;
// HospitalsModel _selectedHospital;
// String amount = "";
// String email;
// PatientInfo _selectedPatientInfo;
// AuthenticatedUser authenticatedUser;
// GetAllSharedRecordsByStatusList selectedPatientFamily;
// AdvanceModel advanceModel = AdvanceModel();
//
// AppSharedPreferences sharedPref = AppSharedPreferences();
// AuthenticatedUser authUser;
//
// @override
// void initState() {
// super.initState();
// getAuthUser();
// }
//
// @override
// Widget build(BuildContext context) {
// return BaseView<MyBalanceViewModel>(
// onModelReady: (model) => model.getHospitals(),
// builder: (_, model, w) => AppScaffold(
// isShowAppBar: true,
// appBarTitle: TranslationBase.of(context).advancePayment,
// body: SingleChildScrollView(
// physics: ScrollPhysics(),
// child: Container(
// margin: EdgeInsets.all(12),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Texts(
// TranslationBase.of(context).advancePaymentLabel,
// textAlign: TextAlign.center,
// ),
// SizedBox(
// height: 12,
// ),
// InkWell(
// onTap: () => confirmSelectBeneficiaryDialog(model),
// child: Container(
// padding: EdgeInsets.all(12),
// width: double.infinity,
// height: 65,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(12),
// color: Colors.white),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Texts(getBeneficiaryType()),
// Icon(Icons.arrow_drop_down)
// ],
// ),
// ),
// ),
// if (beneficiaryType == BeneficiaryType.MyFamilyFiles)
// SizedBox(
// height: 12,
// ),
// if (beneficiaryType == BeneficiaryType.MyFamilyFiles)
// InkWell(
// onTap: () {
// model.getFamilyFiles().then((value) {
// confirmSelectFamilyDialog(model
// .getAllSharedRecordsByStatusResponse
// .getAllSharedRecordsByStatusList);
// }).showProgressBar(
// text: "Loading",
// backgroundColor: Colors.blue.withOpacity(0.6));
// },
// child: Container(
// padding: EdgeInsets.all(12),
// width: double.infinity,
// height: 65,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(12),
// color: Colors.white),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Texts(getFamilyMembersName()),
// Icon(Icons.arrow_drop_down)
// ],
// ),
// ),
// ),
// SizedBox(
// height: 12,
// ),
// NewTextFields(
// hintText: TranslationBase.of(context).fileNumber,
// controller: _fileTextController,
// ),
// if (beneficiaryType == BeneficiaryType.OtherAccount)
// SizedBox(
// height: 12,
// ),
// if (beneficiaryType == BeneficiaryType.OtherAccount)
// InkWell(
// onTap: () {
// if (_fileTextController.text.isNotEmpty)
// model
// .getPatientInfoByPatientID(
// id: _fileTextController.text)
// .then((value) {
// confirmSelectPatientDialog(model.patientInfoList);
// }).showProgressBar(
// text: "Loading",
// backgroundColor:
// Colors.blue.withOpacity(0.6));
// else
// AppToast.showErrorToast(
// message: 'Please Enter The File Number');
// },
// child: Container(
// padding: EdgeInsets.all(12),
// width: double.infinity,
// height: 65,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(12),
// color: Colors.white),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Texts(getPatientName()),
// Icon(Icons.arrow_drop_down)
// ],
// ),
// ),
// ),
// SizedBox(
// height: 12,
// ),
// InkWell(
// onTap: () => confirmSelectHospitalDialog(model.hospitals),
// child: Container(
// padding: EdgeInsets.all(12),
// width: double.infinity,
// height: 65,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(12),
// color: Colors.white),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Texts(getHospitalName()),
// Icon(Icons.arrow_drop_down)
// ],
// ),
// ),
// ),
// SizedBox(
// height: 12,
// ),
// NewTextFields(
// hintText: TranslationBase.of(context).amount,
// keyboardType: TextInputType.number,
// onChanged: (value) {
// setState(() {
// amount = value;
// });
// },
// ),
// SizedBox(
// height: 12,
// ),
// NewTextFields(
// hintText: TranslationBase.of(context).depositorEmail,
// initialValue: model.user.emailAddress,
// onChanged: (value) {
// email = value;
// },
// ),
// SizedBox(
// height: 12,
// ),
// NewTextFields(
// hintText: TranslationBase.of(context).notes,
// controller: _notesTextController,
// ),
// SizedBox(
// height: MediaQuery.of(context).size.height * 0.15,
// )
// ],
// ),
// ),
// ),
// bottomSheet: Container(
// height: MediaQuery.of(context).size.height * 0.1,
// width: double.infinity,
// padding: EdgeInsets.all(12),
// child: SecondaryButton(
// textColor: Colors.white,
// label: TranslationBase.of(context).submit,
// disabled: amount.isEmpty ||
// _fileTextController.text.isEmpty ||
// _selectedHospital == null,
// onTap: () {
// advanceModel.fileNumber = _fileTextController.text;
// advanceModel.hospitalsModel = _selectedHospital;
// advanceModel.note = _notesTextController.text;
// advanceModel.email = email ?? model.user.emailAddress;
// advanceModel.amount = amount;
//
// model.getPatientInfoByPatientIDAndMobileNumber().then((value) {
// if (model.state != ViewState.Error &&
// model.state != ViewState.ErrorLocal) {
// Utils.hideKeyboard(context);
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => PaymentMethod())).then(
// (value) {
// Navigator.push(
// context,
// FadePage(
// page: ConfirmPaymentPage(
// advanceModel: advanceModel,
// selectedPaymentMethod: value,
// patientInfoAndMobileNumber:
// model.patientInfoAndMobileNumber,
// authenticatedUser: authUser,
// ),
// ),
// );
// },
// );
// }
// }).showProgressBar(
// text: "Loading",
// backgroundColor: Colors.blue.withOpacity(0.6));
// },
// ),
// )),
// );
// }
//
// void confirmSelectBeneficiaryDialog(MyBalanceViewModel model) {
// showDialog(
// context: context,
// child: SelectBeneficiaryDialog(
// beneficiaryType: beneficiaryType,
// onValueSelected: (value) {
// setState(() {
// if (value == BeneficiaryType.MyAccount) {
// _fileTextController.text = model.user.patientID.toString();
// advanceModel.depositorName =
// model.user.firstName + " " + model.user.lastName;
// } else
// _fileTextController.text = "";
//
// beneficiaryType = value;
// });
// },
// ),
// );
// }
//
// void confirmSelectHospitalDialog(List<HospitalsModel> hospitals) {
// showDialog(
// context: context,
// child: SelectHospitalDialog(
// hospitals: hospitals,
// selectedHospital: _selectedHospital,
// onValueSelected: (value) {
// setState(() {
// _selectedHospital = value;
// });
// },
// ),
// );
// }
//
// void confirmSelectPatientDialog(List<PatientInfo> patientInfoList) {
// showDialog(
// context: context,
// child: SelectPatientInfoDialog(
// patientInfoList: patientInfoList,
// selectedPatientInfo: _selectedPatientInfo,
// onValueSelected: (value) {
// setState(() {
// advanceModel.depositorName = value.fullName;
// _selectedPatientInfo = value;
// });
// },
// ),
// );
// }
//
// void confirmSelectFamilyDialog(
// List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList) {
// showDialog(
// context: context,
// child: SelectPatientFamilyDialog(
// getAllSharedRecordsByStatusList: getAllSharedRecordsByStatusList,
// selectedPatientFamily: selectedPatientFamily,
// onValueSelected: (value) {
// setState(() {
// selectedPatientFamily = value;
// _fileTextController.text =
// selectedPatientFamily.patientID.toString();
// advanceModel.depositorName = value.patientName;
// });
// },
// ),
// );
// }
//
// String getBeneficiaryType() {
// switch (beneficiaryType) {
// case BeneficiaryType.MyAccount:
// return TranslationBase.of(context).myAccount;
// case BeneficiaryType.MyFamilyFiles:
// return TranslationBase.of(context).myFamilyFiles;
// break;
// case BeneficiaryType.OtherAccount:
// return TranslationBase.of(context).otherAccount;
// break;
// case BeneficiaryType.NON:
// return TranslationBase.of(context).selectBeneficiary;
// }
// return TranslationBase.of(context).selectBeneficiary;
// }
//
// String getHospitalName() {
// if (_selectedHospital != null)
// return _selectedHospital.name;
// else
// return TranslationBase.of(context).selectHospital;
// }
//
// String getPatientName() {
// if (_selectedPatientInfo != null)
// return _selectedPatientInfo.fullName;
// else
// return TranslationBase.of(context).selectPatientName;
// }
//
// getAuthUser() async {
// if (await this.sharedPref.getObject(USER_PROFILE) != null) {
// var data = AuthenticatedUser.fromJson(
// await this.sharedPref.getObject(USER_PROFILE));
// setState(() {
// authUser = data;
// });
// }
// }
//
// String getFamilyMembersName() {
// if (selectedPatientFamily != null)
// return selectedPatientFamily.patientName;
// else
// return TranslationBase.of(context).selectFamilyPatientName;
// }
// }

@ -7,11 +7,13 @@ import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.da
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.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_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
class CovidPaymentDetails extends StatefulWidget { class CovidPaymentDetails extends StatefulWidget {
CovidPaymentInfoResponse covidPaymentInfoResponse; CovidPaymentInfoResponse covidPaymentInfoResponse;
@ -193,7 +195,11 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
), ),
), ),
mWidth(3), mWidth(3),
Text( InkWell(
onTap: () {
launch("https://hmg.com/en/Pages/Privacy.aspx");
},
child: Text(
TranslationBase.of(context).termsConditoins, TranslationBase.of(context).termsConditoins,
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
@ -203,6 +209,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
), ),
), ),
),
], ],
), ),
), ),

@ -33,6 +33,7 @@ class NotificationsDetailsPage extends StatelessWidget {
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).notificationDetails, appBarTitle: TranslationBase.of(context).notificationDetails,
body: ListView( body: ListView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
@ -49,7 +50,6 @@ class NotificationsDetailsPage extends StatelessWidget {
letterSpacing: -0.64, letterSpacing: -0.64,
), ),
), ),
if (notification.messageTypeData.length != 0) if (notification.messageTypeData.length != 0)
Padding( Padding(
padding: const EdgeInsets.only(top: 18), padding: const EdgeInsets.only(top: 18),
@ -64,7 +64,6 @@ class NotificationsDetailsPage extends StatelessWidget {
); );
}, fit: BoxFit.fill), }, fit: BoxFit.fill),
), ),
SizedBox(height: 18), SizedBox(height: 18),
Text( Text(
notification.message.trim(), notification.message.trim(),
@ -75,7 +74,6 @@ class NotificationsDetailsPage extends StatelessWidget {
letterSpacing: -0.48, letterSpacing: -0.48,
), ),
), ),
], ],
), ),
); );

@ -214,7 +214,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
borderRadius: BorderRadius.circular(6), borderRadius: BorderRadius.circular(6),
), ),
child: Text( child: Text(
getNextActionText(widget.appoList[index].nextAction), getNextActionText(widget.appoList[index].nextAction), textAlign: TextAlign.center,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
), ),
), ),

@ -1,6 +1,7 @@
import 'dart:io'; import 'dart:io';
import 'package:diplomaticquarterapp/core/model/my_balance/tamara_installment_details.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/tamara_installment_details.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
class PaymentMethod extends StatefulWidget { class PaymentMethod extends StatefulWidget {
Function onSelectedMethod; Function onSelectedMethod;
@ -27,6 +29,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).paymentMethod, appBarTitle: TranslationBase.of(context).paymentMethod,
isShowAppBar: true, isShowAppBar: true,
@ -45,6 +48,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
margin: EdgeInsets.fromLTRB(4, 15.0, 4, 0.0), margin: EdgeInsets.fromLTRB(4, 15.0, 4, 0.0),
child: Text(TranslationBase.of(context).selectPaymentOption, style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold)), child: Text(TranslationBase.of(context).selectPaymentOption, style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold)),
), ),
if (projectViewModel.havePrivilege(86))
Container( Container(
width: double.infinity, width: double.infinity,
child: InkWell( child: InkWell(
@ -94,6 +98,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
), ),
), ),
), ),
if (projectViewModel.havePrivilege(87))
Container( Container(
width: double.infinity, width: double.infinity,
child: InkWell( child: InkWell(
@ -143,6 +148,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
), ),
), ),
), ),
if (projectViewModel.havePrivilege(88))
Container( Container(
width: double.infinity, width: double.infinity,
child: InkWell( child: InkWell(
@ -241,7 +247,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
// ), // ),
// ), // ),
// ), // ),
if (widget.isShowInstallments) if (widget.isShowInstallments && projectViewModel.havePrivilege(91))
Container( Container(
width: double.infinity, width: double.infinity,
child: InkWell( child: InkWell(
@ -292,7 +298,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
), ),
), ),
), ),
Platform.isIOS (Platform.isIOS && projectViewModel.havePrivilege(89))
? Container( ? Container(
width: double.infinity, width: double.infinity,
child: InkWell( child: InkWell(

@ -6,19 +6,18 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/permission/permission_service.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.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/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart'; import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/floating_button_search.dart'; import 'package:diplomaticquarterapp/widgets/others/floating_button_search.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -32,6 +31,7 @@ import 'package:speech_to_text/speech_to_text.dart' as stt;
class SendFeedbackPage extends StatefulWidget { class SendFeedbackPage extends StatefulWidget {
final AppoitmentAllHistoryResultList appointment; final AppoitmentAllHistoryResultList appointment;
final MessageType messageType; final MessageType messageType;
const SendFeedbackPage({Key key, this.appointment, this.messageType = MessageType.NON}) : super(key: key); const SendFeedbackPage({Key key, this.appointment, this.messageType = MessageType.NON}) : super(key: key);
@override @override
@ -93,7 +93,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
this.messageType = widget.messageType; this.messageType = widget.messageType;
this.appointHistory = widget.appointment; this.appointHistory = widget.appointment;
}); });
requestPermissions(); // requestPermissions();
event.controller.stream.listen((p) { event.controller.stream.listen((p) {
if (p['isIOSFeedback'] == 'true') { if (p['isIOSFeedback'] == 'true') {
if (this.mounted) { if (this.mounted) {
@ -217,8 +217,18 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
), ),
inputWidget(TranslationBase.of(context).subject, "", titleController), inputWidget(TranslationBase.of(context).subject, "", titleController),
SizedBox(height: 12), SizedBox(height: 12),
inputWidget(TranslationBase.of(context).message, "", messageController, lines: 11, suffixTap: () { inputWidget(TranslationBase.of(context).message, "", messageController, lines: 11, suffixTap: () async {
if (Platform.isAndroid) {
if (await PermissionService.isMicrophonePermissionEnabled()) {
openSpeechReco();
} else {
Utils.showPermissionConsentDialog(context, TranslationBase.of(context).recordAudioPermission, () {
openSpeechReco(); openSpeechReco();
});
}
} else {
openSpeechReco();
}
}), }),
SizedBox(height: 12), SizedBox(height: 12),
InkWell( InkWell(
@ -536,7 +546,6 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
Map<Permission, PermissionStatus> statuses = await [ Map<Permission, PermissionStatus> statuses = await [
Permission.microphone, Permission.microphone,
].request(); ].request();
print(statuses);
} }
void resultListener(result) { void resultListener(result) {
@ -548,7 +557,6 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
messageController.text += reconizedWord + '\n'; messageController.text += reconizedWord + '\n';
RoboSearch.closeAlertDialog(context); RoboSearch.closeAlertDialog(context);
speech.stop(); speech.stop();
}); });
} }
} }

@ -290,7 +290,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
onTap: () { onTap: () {
projectViewModel.analytics.offerPackages.log(); projectViewModel.analytics.offerPackages.log();
AuthenticatedUser user = projectViewModel.user; AuthenticatedUser user = projectViewModel.user;
if(projectViewModel.havePrivilege(82)) // if(projectViewModel.havePrivilege(82))
Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesOfferTabPage(user))); Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesOfferTabPage(user)));
}, },
child: Stack( child: Stack(
@ -305,7 +305,6 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
Container( Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
// color: Color(0xFF2B353E),
decoration: containerRadius(Color(0xFF2B353E), 20), decoration: containerRadius(Color(0xFF2B353E), 20),
), ),
Container( Container(

@ -39,6 +39,8 @@ import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.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:flutter_app_icon_badge/flutter_app_icon_badge.dart';
import '../../locator.dart'; import '../../locator.dart';
import '../../routes.dart'; import '../../routes.dart';
@ -236,6 +238,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_requestIOSPermissions(); _requestIOSPermissions();
pageController = PageController(keepPage: true); pageController = PageController(keepPage: true);
_firebaseMessaging.setAutoInitEnabled(true); _firebaseMessaging.setAutoInitEnabled(true);
// locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context); // locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context);
@ -248,6 +251,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// HMG (Guest/Internet) Wifi Access [Zohaib Kambrani] // HMG (Guest/Internet) Wifi Access [Zohaib Kambrani]
// for now commented to reduce this call will enable it when needed // for now commented to reduce this call will enable it when needed
HMGNetworkConnectivity(context).start(); HMGNetworkConnectivity(context).start();
_firebaseMessaging.getToken().then((String token) { _firebaseMessaging.getToken().then((String token) {
print("Firebase Token: " + token); print("Firebase Token: " + token);
sharedPref.setString(PUSH_TOKEN, token); sharedPref.setString(PUSH_TOKEN, token);
@ -530,6 +534,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, true, notificationCount); model.setState(model.count, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
FlutterAppIconBadge.updateBadge(num.parse(notificationCount));
} }
}), }),
}); });

@ -281,7 +281,6 @@ class ServicesView extends StatelessWidget {
showCovidDialog(BuildContext context) { showCovidDialog(BuildContext context) {
if (Platform.isAndroid) { if (Platform.isAndroid) {
// Utils.showPermissionConsentDialog(context, "", () {});
showDialog( showDialog(
context: context, context: context,
builder: (cxt) => CovidConsentDialog( builder: (cxt) => CovidConsentDialog(

@ -43,11 +43,6 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
isCameraReady = false; isCameraReady = false;
WidgetsBinding.instance.addPostFrameCallback((_) => _runAnimation()); WidgetsBinding.instance.addPostFrameCallback((_) => _runAnimation());
//
// print(widget.incomingCallData.doctorname);
// print(widget.incomingCallData.clinicname);
// print(widget.incomingCallData.speciality);
super.initState(); super.initState();
} }

@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
class LiveCarePatmentPage extends StatefulWidget { class LiveCarePatmentPage extends StatefulWidget {
GetERAppointmentFeesList getERAppointmentFeesList; GetERAppointmentFeesList getERAppointmentFeesList;
@ -226,7 +227,11 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
), ),
), ),
mWidth(4), mWidth(4),
Text( InkWell(
onTap: () {
launch("https://hmg.com/en/Pages/Privacy.aspx");
},
child: Text(
TranslationBase.of(context).termsConditoins, TranslationBase.of(context).termsConditoins,
style: new TextStyle( style: new TextStyle(
fontSize: 12.0, fontSize: 12.0,
@ -235,6 +240,7 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
color: CustomColors.accentColor, color: CustomColors.accentColor,
), ),
), ),
),
], ],
), ),
), ),

@ -193,7 +193,7 @@ class _clinic_listState extends State<ClinicList> {
askVideoCallPermission().then((value) { askVideoCallPermission().then((value) {
if (value) { if (value) {
if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") { if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") {
showLiveCareInfoDialog(getERAppointmentFeesList); addNewCallForPatientER(projectViewModel.user.patientID.toString() + "" + DateTime.now().millisecondsSinceEpoch.toString());
} else { } else {
navigateToPaymentMethod(getERAppointmentFeesList, context); navigateToPaymentMethod(getERAppointmentFeesList, context);
} }
@ -294,7 +294,7 @@ class _clinic_listState extends State<ClinicList> {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context); browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context);
browser.openPaymentBrowser(amount, "LiveCare Payment", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), "12", authenticatedUser.emailAddress, paymentMethod[0], browser.openPaymentBrowser(amount, "LiveCare Payment", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), "12", authenticatedUser.emailAddress, paymentMethod[0],
authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "4", selectedClinicID.toString(), "", "", "", "", paymentMethod[1]); authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "4", selectedClinicID, "", "", "", "", paymentMethod[1]);
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {

@ -348,7 +348,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
transID = Utils.getAdvancePaymentTransID(widget.advanceModel.hospitalsModel.iD, int.parse(widget.advanceModel.fileNumber)); transID = Utils.getAdvancePaymentTransID(widget.advanceModel.hospitalsModel.iD, int.parse(widget.advanceModel.fileNumber));
browser.openPaymentBrowser(amount, "Advance Payment", transID, widget.advanceModel.hospitalsModel.iD.toString(), widget.advanceModel.email, paymentMethod, browser.openPaymentBrowser(amount, "Advance Payment", transID, widget.advanceModel.hospitalsModel.iD.toString(), widget.advanceModel.email, paymentMethod,
widget.patientInfoAndMobileNumber.patientType, widget.advanceModel.patientName, widget.advanceModel.fileNumber, authenticatedUser, browser, false, "3", "", "", "", "", "", widget.installmentPlan); widget.patientInfoAndMobileNumber.patientType, widget.advanceModel.patientName, widget.advanceModel.fileNumber, authenticatedUser, browser, false, "3", "0", "", "", "", "", widget.installmentPlan);
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {

@ -216,7 +216,7 @@ class LiveCareService extends BaseService {
"ClientRequestID": clientRequestID, "ClientRequestID": clientRequestID,
"DeviceToken": deviceToken, "DeviceToken": deviceToken,
"VoipToken": "", "VoipToken": "",
// "IsFlutter": true, "IsFlutter": true,
"Latitude": await this.sharedPref.getDouble(USER_LAT), "Latitude": await this.sharedPref.getDouble(USER_LAT),
"Longitude": await this.sharedPref.getDouble(USER_LONG), "Longitude": await this.sharedPref.getDouble(USER_LONG),
"DeviceType": Platform.isIOS ? 'iOS' : 'Android', "DeviceType": Platform.isIOS ? 'iOS' : 'Android',

@ -1,35 +1,49 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
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/notifications/get_notifications_response_model.dart';
import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart'; import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notification_details_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart'; import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart';
import 'package:diplomaticquarterapp/uitl/app-permissions.dart'; import 'package:diplomaticquarterapp/uitl/app-permissions.dart';
import 'package:flutter/cupertino.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:flutter/material.dart';
import 'package:huawei_push/huawei_push.dart' as h_push;
import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:firebase_messaging/firebase_messaging.dart' as fir; import 'package:firebase_messaging/firebase_messaging.dart' as fir;
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart'; import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:huawei_push/huawei_push.dart' as h_push;
import 'app_shared_preferences.dart'; import 'app_shared_preferences.dart';
import 'navigation_service.dart'; import 'navigation_service.dart';
// |--> Push Notification Background // |--> Push Notification Background
Future<dynamic> backgroundMessageHandler(dynamic message) async { Future<dynamic> backgroundMessageHandler(dynamic message) async {
print("Firebase backgroundMessageHandler!!!");
fir.RemoteMessage message_; fir.RemoteMessage message_;
if (message is h_push.RemoteMessage) { if (message is h_push.RemoteMessage) {
// if huawei remote message convert it to Firebase Remote Message // if huawei remote message convert it to Firebase Remote Message
message_ = toFirebaseRemoteMessage(message); message_ = toFirebaseRemoteMessage(message);
h_push.Push.localNotification({h_push.HMSLocalNotificationAttr.TITLE: 'Background Message', h_push.HMSLocalNotificationAttr.MESSAGE: "By: BackgroundMessageHandler"});
} }
if (message.data != null && message.data['is_call'] == 'true') { if (message.data != null && message.data['is_call'] == 'true') {
_incomingCall(message.data); _incomingCall(message.data);
return; return;
} else {
GetNotificationsResponseModel notification = new GetNotificationsResponseModel();
notification.createdOn = DateUtil.convertDateToString(DateTime.now());
notification.messageTypeData = message.data['picture'];
notification.message = message.data['message'];
await NavigationService.navigateToPage(NotificationsDetailsPage(
notification: notification,
));
} }
h_push.Push.localNotification({h_push.HMSLocalNotificationAttr.TITLE: 'Background Message', h_push.HMSLocalNotificationAttr.MESSAGE: "By: BackgroundMessageHandler"});
} }
// Push Notification Background <--| // Push Notification Background <--|
@ -90,39 +104,44 @@ class PushNotificationHandler {
static PushNotificationHandler getInstance() => _instance; static PushNotificationHandler getInstance() => _instance;
init() async { init() async {
final fcmToken = await FirebaseMessaging.instance.getToken();
if (fcmToken != null) onToken(fcmToken);
if (Platform.isIOS) { if (Platform.isIOS) {
final permission = await FirebaseMessaging.instance.requestPermission(); final permission = await FirebaseMessaging.instance.requestPermission();
if (permission.authorizationStatus == AuthorizationStatus.denied) return; if (permission.authorizationStatus == AuthorizationStatus.denied) return;
} }
if (Platform.isAndroid && (await FlutterHmsGmsAvailability.isHmsAvailable)) { // if (Platform.isAndroid && (await FlutterHmsGmsAvailability.isHmsAvailable)) {
// 'Android HMS' (Handle Huawei Push_Kit Streams) // // 'Android HMS' (Handle Huawei Push_Kit Streams)
//
h_push.Push.enableLogger(); // h_push.Push.enableLogger();
final result = await h_push.Push.setAutoInitEnabled(true); // final result = await h_push.Push.setAutoInitEnabled(true);
//
h_push.Push.onNotificationOpenedApp.listen((message) { // h_push.Push.onNotificationOpenedApp.listen((message) {
newMessage(toFirebaseRemoteMessage(message)); // newMessage(toFirebaseRemoteMessage(message));
}, onError: (e) => print(e.toString())); // }, onError: (e) => print(e.toString()));
//
h_push.Push.onMessageReceivedStream.listen((message) { // h_push.Push.onMessageReceivedStream.listen((message) {
newMessage(toFirebaseRemoteMessage(message)); // newMessage(toFirebaseRemoteMessage(message));
}, onError: (e) => print(e.toString())); // }, onError: (e) => print(e.toString()));
//
h_push.Push.getTokenStream.listen((token) { // h_push.Push.getTokenStream.listen((token) {
onToken(token); // onToken(token);
}, onError: (e) => print(e.toString())); // }, onError: (e) => print(e.toString()));
await h_push.Push.getToken(''); // await h_push.Push.getToken('');
//
h_push.Push.registerBackgroundMessageHandler(backgroundMessageHandler); // h_push.Push.registerBackgroundMessageHandler(backgroundMessageHandler);
} else { // } else {
// 'Android GMS or iOS' (Handle Firebase Messaging Streams) // 'Android GMS or iOS' (Handle Firebase Messaging Streams)
print("Firebase onMessage!!!--------------------");
FirebaseMessaging.onMessage.listen((RemoteMessage message) async { FirebaseMessaging.onMessage.listen((RemoteMessage message) async {
print("Firebase onMessage!!!");
newMessage(message); newMessage(message);
}); });
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) { FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
print("Firebase onMessageOpenedApp!!!");
newMessage(message); newMessage(message);
}); });
@ -131,14 +150,24 @@ class PushNotificationHandler {
}); });
FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler); FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler);
// }
final fcmToken = await FirebaseMessaging.instance.getToken();
if (fcmToken != null) onToken(fcmToken);
}
} }
newMessage(RemoteMessage remoteMessage) { newMessage(RemoteMessage remoteMessage) async {
if (remoteMessage.data['is_call'] == 'true' || remoteMessage.data['is_call'] == true) _incomingCall(remoteMessage.data); print("Remote Message: " + remoteMessage.data.toString());
if (remoteMessage.data['is_call'] == 'true' || remoteMessage.data['is_call'] == true) {
_incomingCall(remoteMessage.data);
} else {
GetNotificationsResponseModel notification = new GetNotificationsResponseModel();
notification.createdOn = DateUtil.convertDateToString(DateTime.now());
notification.messageTypeData = remoteMessage.data['picture'];
notification.message = remoteMessage.data['message'];
await NavigationService.navigateToPage(NotificationsDetailsPage(
notification: notification,
));
}
} }
onToken(String token) async { onToken(String token) async {

@ -88,6 +88,10 @@ class AppMapState extends State<AppMap> {
_huaweiMapControllerComp.complete(controller); _huaweiMapControllerComp.complete(controller);
widget.onMapCreated(); widget.onMapCreated();
}, },
onCameraIdle: () {
print("onCameraIdle");
widget.onCameraIdle();
},
); );
} }
} }

@ -32,13 +32,13 @@ 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 LIVE
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWeb/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWeb/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 PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT // static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID = // static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; // 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';
@ -155,28 +155,28 @@ class MyInAppBrowser extends InAppBrowser {
ApplePayInsertRequest applePayInsertRequest = new ApplePayInsertRequest(); ApplePayInsertRequest applePayInsertRequest = new ApplePayInsertRequest();
applePayInsertRequest.clientRequestID = transactionID; applePayInsertRequest.clientRequestID = transactionID;
applePayInsertRequest.clinicID = clinicID != null ? clinicID : 0; applePayInsertRequest.clinicID = (clinicID != null && clinicID != "") ? clinicID : 0;
applePayInsertRequest.currency = authenticatedUser.outSA == 1 ? "AED" : "SAR"; applePayInsertRequest.currency = authenticatedUser.outSA == 1 ? "AED" : "SAR";
applePayInsertRequest.customerEmail = emailId; applePayInsertRequest.customerEmail = emailId;
applePayInsertRequest.customerID = authenticatedUser.patientID; applePayInsertRequest.customerID = authenticatedUser.patientID;
applePayInsertRequest.customerName = authenticatedUser.firstName; applePayInsertRequest.customerName = authenticatedUser.firstName;
applePayInsertRequest.deviceToken = deviceToken; applePayInsertRequest.deviceToken = deviceToken;
applePayInsertRequest.doctorID = doctorID != null ? doctorID : 0; applePayInsertRequest.doctorID = (doctorID != null && doctorID != "") ? doctorID : 0;
applePayInsertRequest.projectID = projId; applePayInsertRequest.projectID = projId;
applePayInsertRequest.serviceID = servID; applePayInsertRequest.serviceID = servID;
applePayInsertRequest.channelID = 3; applePayInsertRequest.channelID = 3;
applePayInsertRequest.patientID = authenticatedUser.patientID; applePayInsertRequest.patientID = authenticatedUser.patientID;
applePayInsertRequest.patientTypeID = authenticatedUser.patientType; applePayInsertRequest.patientTypeID = authenticatedUser.patientType;
applePayInsertRequest.patientOutSA = authenticatedUser.outSA; applePayInsertRequest.patientOutSA = authenticatedUser.outSA;
applePayInsertRequest.appointmentDate = appoDate != null ? appoDate : null; applePayInsertRequest.appointmentDate = (appoDate != null && appoDate != "") ? appoDate : null;
applePayInsertRequest.appointmentNo = appoNo != null ? appoNo : 0; applePayInsertRequest.appointmentNo = (appoNo != null && appoNo != "") ? appoNo : 0;
applePayInsertRequest.orderDescription = orderDesc; applePayInsertRequest.orderDescription = orderDesc;
applePayInsertRequest.liveServiceID = LiveServID; applePayInsertRequest.liveServiceID = LiveServID.toString() == "" ? "0" : LiveServID.toString();
applePayInsertRequest.latitude = this.lat.toString(); applePayInsertRequest.latitude = this.lat.toString();
applePayInsertRequest.longitude = this.long.toString(); applePayInsertRequest.longitude = this.long.toString();
applePayInsertRequest.amount = amount.toString(); applePayInsertRequest.amount = amount.toString();
applePayInsertRequest.isSchedule = "0"; applePayInsertRequest.isSchedule = "0";
applePayInsertRequest.language = await getLanguageID() == 'ar' ? 'AR' : 'EN'; applePayInsertRequest.language = await getLanguageID() == 'ar' ? 'ar' : 'en';
applePayInsertRequest.userName = authenticatedUser.patientID; applePayInsertRequest.userName = authenticatedUser.patientID;
applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html"; applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html";
applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html"; applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html";
@ -258,7 +258,7 @@ class MyInAppBrowser extends InAppBrowser {
if (servID != null) { if (servID != null) {
form = form.replaceFirst('SERV_ID', servID); form = form.replaceFirst('SERV_ID', servID);
form = form.replaceFirst('LIVE_SERVICE_ID', LiveServID); form = form.replaceFirst('LIVE_SERVICE_ID', LiveServID.toString());
} else { } else {
form = form.replaceFirst('SERV_ID', "2"); form = form.replaceFirst('SERV_ID', "2");
form = form.replaceFirst('LIVE_SERVICE_ID', "2"); form = form.replaceFirst('LIVE_SERVICE_ID', "2");

@ -128,7 +128,7 @@ class SMSOTP {
pinTextAnimatedSwitcherTransition: ProvidedPinBoxTextAnimation.scalingTransition, pinTextAnimatedSwitcherTransition: ProvidedPinBoxTextAnimation.scalingTransition,
pinTextAnimatedSwitcherDuration: Duration(milliseconds: 300), pinTextAnimatedSwitcherDuration: Duration(milliseconds: 300),
pinBoxRadius: 10, pinBoxRadius: 10,
keyboardType: TextInputType.number, keyboardType: TextInputType.numberWithOptions(),
), ),
), ),
), ),

@ -2,7 +2,7 @@ name: diplomaticquarterapp
description: A new Flutter application. description: A new Flutter application.
version: 4.4.3+1 version: 4.4.6+40406
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"
@ -180,6 +180,7 @@ dependencies:
in_app_review: ^2.0.3 in_app_review: ^2.0.3
badges: ^2.0.1 badges: ^2.0.1
flutter_app_icon_badge: ^2.0.0
syncfusion_flutter_sliders: ^19.3.55 syncfusion_flutter_sliders: ^19.3.55
searchable_dropdown: ^1.1.3 searchable_dropdown: ^1.1.3
dropdown_search: 0.4.9 dropdown_search: 0.4.9

Loading…
Cancel
Save