diff --git a/android/app/build.gradle b/android/app/build.gradle index 849ffc0e..ed39cd6b 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -25,9 +25,9 @@ android { defaultConfig { applicationId "com.redseaglobal.redseahealth" // minSdk 24 - minSdkVersion 26 - targetSdkVersion 36 - compileSdkVersion 36 + minSdkVersion 28 + targetSdkVersion 37 + compileSdkVersion 37 // targetSdk = flutter.targetSdkVersion versionCode = flutter.versionCode versionName = flutter.versionName @@ -147,15 +147,15 @@ dependencies { implementation "androidx.room:room-runtime:$room_version" annotationProcessor "androidx.room:room-compiler:$room_version" - implementation 'net.zetetic:android-database-sqlcipher:4.5.4' + implementation 'net.zetetic:sqlcipher-android:4.19.0' implementation 'com.intuit.ssp:ssp-android:1.1.0' implementation 'com.intuit.sdp:sdp-android:1.1.0' implementation 'com.github.bumptech.glide:glide:4.16.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0' - implementation 'com.mapbox.maps:android:11.5.0' - implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:7.3.1' + implementation 'com.mapbox.maps:android-ndk27:11.31.0' + implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:7.10.1' // implementation 'com.mapbox.maps:android:11.4.0' // AARs @@ -166,7 +166,7 @@ dependencies { implementation 'com.github.kittinunf.fuel:fuel:2.3.1' implementation 'com.github.kittinunf.fuel:fuel-android:2.3.1' - implementation "com.opentok.android:opentok-android-sdk:2.25.2" + implementation "com.opentok.android:opentok-android-sdk:2.34.1" implementation 'com.facebook.stetho:stetho:1.6.0' implementation 'com.facebook.stetho:stetho-urlconnection:1.6.0' @@ -175,7 +175,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.7.1' implementation 'com.google.android.material:material:1.12.0' - implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.25' + implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.32' androidTestImplementation "androidx.test:core:1.6.1" implementation 'com.whatsapp.otp:whatsapp-otp-android-sdk:0.1.0' diff --git a/lib/analytics/google-analytics.dart b/lib/analytics/google-analytics.dart index 484efc12..c98067bc 100644 --- a/lib/analytics/google-analytics.dart +++ b/lib/analytics/google-analytics.dart @@ -66,7 +66,7 @@ class GAnalytics { if (await PermissionService.isLocationEnabled()) { final location = await Geolocator.getCurrentPosition(); if (location != null && !location.isMocked) { - final places = await placemarkFromCoordinates(location.latitude, location.longitude,); + final places = await Geocoding().placemarkFromCoordinates(location.latitude, location.longitude,); final countryCode = places.first.isoCountryCode; _analytics.setUserProperty(name: 'user_country', value: countryCode); } @@ -95,14 +95,14 @@ class NavObserver extends RouteObserver> { log(String className) { var event = AnalyticEvents.get(className); if (event.active != null) { - _analytics.setCurrentScreen(screenName: event.flutterName(), screenClassOverride: className).catchError( - (Object error) { - print('$FirebaseAnalyticsObserver: $error'); - }, - test: (Object error) { - return error is PlatformException; - }, - ); + // // _analytics.c(screenName: event.flutterName(), screenClassOverride: className).catchError( + // (Object error) { + // print('$FirebaseAnalyticsObserver: $error'); + // }, + // test: (Object error) { + // return error is PlatformException; + // }, + // ); } } diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart index c47d4efa..a5352249 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart @@ -78,7 +78,7 @@ class _CMCLocationPageState extends State { setState(() {}); }, onCameraIdle: () async { - List placemarks = await placemarkFromCoordinates(latitude, longitude); + List placemarks = await Geocoding().placemarkFromCoordinates(latitude, longitude); selectedPlace = placemarks[0]; print(selectedPlace); }, diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart index c46389ca..b48e8a23 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart @@ -89,7 +89,7 @@ class _LocationPageState extends State { setState(() {}); }, onCameraIdle: () async { - List placemarks = await placemarkFromCoordinates(latitude, longitude); + List placemarks = await Geocoding().placemarkFromCoordinates(latitude, longitude); selectedPlace = placemarks[0]; print(selectedPlace); }, diff --git a/lib/pages/DrawerPages/notifications/notification_details_page.dart b/lib/pages/DrawerPages/notifications/notification_details_page.dart index 8b670190..d5e14169 100644 --- a/lib/pages/DrawerPages/notifications/notification_details_page.dart +++ b/lib/pages/DrawerPages/notifications/notification_details_page.dart @@ -20,12 +20,12 @@ class _NotificationsDetailsPageState extends State { @override void initState() { - _controller = YoutubePlayerController( - initialVideoId: getVideoURL(), - flags: YoutubePlayerFlags( - autoPlay: true, + _controller = YoutubePlayerController.fromVideoId( + videoId: getVideoURL(), + params: YoutubePlayerParams( mute: false, ), + autoPlay: true ); super.initState(); } @@ -50,7 +50,7 @@ class _NotificationsDetailsPageState extends State { String getVideoURL() { if (widget.notification.videoURL != null && widget.notification.notificationType == "2") { String videoId; - videoId = YoutubePlayer.convertUrlToId(widget.notification.videoURL)!; + videoId = YoutubePlayerController.convertUrlToId(widget.notification.videoURL)!; print(videoId); // BBAyRBTfsOU return videoId; }else{ @@ -96,7 +96,6 @@ class _NotificationsDetailsPageState extends State { padding: const EdgeInsets.only(top: 18), child: YoutubePlayer( controller: _controller, - showVideoProgressIndicator: true, ), ), if (widget.notification.messageTypeData != null) diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart index a6342695..1e0b9320 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart @@ -44,7 +44,7 @@ import 'package:gms_check/gms_check.dart'; // import 'package:huawei_hmsavailability/huawei_hmsavailability.dart'; import 'package:huawei_map/huawei_map.dart' as hmsMap; import 'package:intl/intl.dart'; -import 'package:map_launcher/map_launcher.dart'; +import 'package:map_launcher/map_launcher.dart' as mapLauncher; import 'package:permission_handler/permission_handler.dart'; import 'package:provider/provider.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -495,16 +495,10 @@ class _AppointmentActionsState extends State { } static Future openMap(double latitude, double longitude) async { - await MapLauncher.showMarker( - mapType: Platform.isAndroid - ? isHuawei == true - ? MapType.petal - : MapType.google - : MapType.apple, - coords: Coords(latitude, longitude), - title: "Sulaiman Al Habib", - description: "Appointment Location", + await mapLauncher.MapLauncher.marker( + mapLauncher.LocationCoords(latitude, longitude) ); + } checkIsHuawei() async { diff --git a/lib/pages/conference/zoom/call_screen.dart b/lib/pages/conference/zoom/call_screen.dart index 1d71d72c..cc70b414 100644 --- a/lib/pages/conference/zoom/call_screen.dart +++ b/lib/pages/conference/zoom/call_screen.dart @@ -3,7 +3,6 @@ import 'dart:convert'; import 'dart:io'; import 'package:diplomaticquarterapp/pages/conference/zoom/jwt.dart'; import 'package:diplomaticquarterapp/pages/conference/zoom/video_view.dart'; -import 'package:events_emitter/events_emitter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; @@ -143,10 +142,10 @@ class _CallScreenState extends State { }); useEffect(() { - eventListener.addEventListener(); + // eventListener.addEventListener(); EventEmitter emitter = eventListener.eventEmitter; - final sessionJoinListener = emitter.on(EventType.onSessionJoin, (sessionUser) async { + final sessionJoinListener = emitter.addListener(EventType.onSessionJoin, (sessionUser) async { isInSession.value = true; zoom.session.getSessionName().then((value) => sessionName.value = value!); sessionPassword.value = await zoom.session.getSessionPassword(); @@ -166,7 +165,7 @@ class _CallScreenState extends State { isReceiveSpokenLanguageContentEnabled.value = await zoom.liveTranscriptionHelper.isReceiveSpokenLanguageContentEnabled(); }); - final sessionLeaveListener = emitter.on(EventType.onSessionLeave, (data) async { + final sessionLeaveListener = emitter.addListener(EventType.onSessionLeave, (data) async { isInSession.value = false; users.value = []; fullScreenUser.value = null; @@ -175,7 +174,7 @@ class _CallScreenState extends State { WakelockPlus.disable(); }); - final sessionNeedPasswordListener = emitter.on(EventType.onSessionNeedPassword, (data) async { + final sessionNeedPasswordListener = emitter.addListener(EventType.onSessionNeedPassword, (data) async { showDialog( context: context, builder: (BuildContext context) => AlertDialog( @@ -195,7 +194,7 @@ class _CallScreenState extends State { ); }); - final sessionPasswordWrongListener = emitter.on(EventType.onSessionPasswordWrong, (data) async { + final sessionPasswordWrongListener = emitter.addListener(EventType.onSessionPasswordWrong, (data) async { showDialog( context: context, builder: (BuildContext context) => AlertDialog( @@ -215,7 +214,7 @@ class _CallScreenState extends State { ); }); - final userVideoStatusChangedListener = emitter.on(EventType.onUserVideoStatusChanged, (data) async { + final userVideoStatusChangedListener = emitter.addListener(EventType.onUserVideoStatusChanged, (data) async { data = data as Map; ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); var userListJson = jsonDecode(data['changedUsers']) as List; @@ -230,7 +229,7 @@ class _CallScreenState extends State { videoStatusFlag.value = !videoStatusFlag.value; }); - final userAudioStatusChangedListener = emitter.on(EventType.onUserAudioStatusChanged, (data) async { + final userAudioStatusChangedListener = emitter.addListener(EventType.onUserAudioStatusChanged, (data) async { data = data as Map; ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); var userListJson = jsonDecode(data['changedUsers']) as List; @@ -245,7 +244,7 @@ class _CallScreenState extends State { audioStatusFlag.value = !audioStatusFlag.value; }); - final userShareStatusChangeListener = emitter.on(EventType.onUserShareStatusChanged, (data) async { + final userShareStatusChangeListener = emitter.addListener(EventType.onUserShareStatusChanged, (data) async { data = data as Map; ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); ZoomVideoSdkUser shareUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['user'].toString())); @@ -262,7 +261,7 @@ class _CallScreenState extends State { userShareStatusFlag.value = !userShareStatusFlag.value; }); - final userJoinListener = emitter.on(EventType.onUserJoin, (data) async { + final userJoinListener = emitter.addListener(EventType.onUserJoin, (data) async { if (!isMounted()) return; data = data as Map; ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); @@ -273,7 +272,7 @@ class _CallScreenState extends State { fullScreenUser.value = remoteUserList[1]; }); - final userLeaveListener = emitter.on(EventType.onUserLeave, (data) async { + final userLeaveListener = emitter.addListener(EventType.onUserLeave, (data) async { if (!isMounted()) return; ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); data = data as Map; @@ -296,7 +295,7 @@ class _CallScreenState extends State { users.value = remoteUserList; }); - final userNameChangedListener = emitter.on(EventType.onUserNameChanged, (data) async { + final userNameChangedListener = emitter.addListener(EventType.onUserNameChanged, (data) async { if (!isMounted()) return; data = data as Map; ZoomVideoSdkUser? changedUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['changedUser'])); @@ -310,27 +309,27 @@ class _CallScreenState extends State { userNameFlag.value = !userNameFlag.value; }); - final commandReceived = emitter.on(EventType.onCommandReceived, (data) async { + final commandReceived = emitter.addListener(EventType.onCommandReceived, (data) async { data = data as Map; debugPrint("sender: ${ZoomVideoSdkUser.fromJson(jsonDecode(data['sender']))}, command: ${data['command']}"); }); - final chatDeleteMessageNotify = emitter.on(EventType.onChatDeleteMessageNotify, (data) async { + final chatDeleteMessageNotify = emitter.addListener(EventType.onChatDeleteMessageNotify, (data) async { data = data as Map; debugPrint("onChatDeleteMessageNotify: messageID: ${data['msgID']}, deleteBy: ${data['type']}"); }); - final liveStreamStatusChangeListener = emitter.on(EventType.onLiveStreamStatusChanged, (data) async { + final liveStreamStatusChangeListener = emitter.addListener(EventType.onLiveStreamStatusChanged, (data) async { data = data as Map; debugPrint("onLiveStreamStatusChanged: status: ${data['status']}"); }); - final liveTranscriptionStatusChangeListener = emitter.on(EventType.onLiveTranscriptionStatus, (data) async { + final liveTranscriptionStatusChangeListener = emitter.addListener(EventType.onLiveTranscriptionStatus, (data) async { data = data as Map; debugPrint("onLiveTranscriptionStatus: status: ${data['status']}"); }); - final cloudRecordingStatusListener = emitter.on(EventType.onCloudRecordingStatus, (data) async { + final cloudRecordingStatusListener = emitter.addListener(EventType.onCloudRecordingStatus, (data) async { data = data as Map; debugPrint("onCloudRecordingStatus: status: ${data['status']}"); ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); @@ -382,18 +381,18 @@ class _CallScreenState extends State { } }); - final liveTranscriptionMsgInfoReceivedListener = emitter.on(EventType.onLiveTranscriptionMsgInfoReceived, (data) async { + final liveTranscriptionMsgInfoReceivedListener = emitter.addListener(EventType.onLiveTranscriptionMsgInfoReceived, (data) async { data = data as Map; ZoomVideoSdkLiveTranscriptionMessageInfo? messageInfo = ZoomVideoSdkLiveTranscriptionMessageInfo.fromJson(jsonDecode(data['messageInfo'])); debugPrint("onLiveTranscriptionMsgInfoReceived: content: ${messageInfo.messageContent}"); }); - final inviteByPhoneStatusListener = emitter.on(EventType.onInviteByPhoneStatus, (data) async { + final inviteByPhoneStatusListener = emitter.addListener(EventType.onInviteByPhoneStatus, (data) async { data = data as Map; debugPrint("onInviteByPhoneStatus: status: ${data['status']}, reason: ${data['reason']}"); }); - final multiCameraStreamStatusChangedListener = emitter.on(EventType.onMultiCameraStreamStatusChanged, (data) async { + final multiCameraStreamStatusChangedListener = emitter.addListener(EventType.onMultiCameraStreamStatusChanged, (data) async { data = data as Map; ZoomVideoSdkUser? changedUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['changedUser'])); var status = data['status']; @@ -410,7 +409,7 @@ class _CallScreenState extends State { } }); - final requireSystemPermission = emitter.on(EventType.onRequireSystemPermission, (data) async { + final requireSystemPermission = emitter.addListener(EventType.onRequireSystemPermission, (data) async { data = data as Map; ZoomVideoSdkUser? changedUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['changedUser'])); var permissionType = data['permissionType']; @@ -448,7 +447,7 @@ class _CallScreenState extends State { } }); - final networkStatusChangeListener = emitter.on(EventType.onUserVideoNetworkStatusChanged, (data) async { + final networkStatusChangeListener = emitter.addListener(EventType.onUserVideoNetworkStatusChanged, (data) async { data = data as Map; ZoomVideoSdkUser? networkUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['user'])); @@ -457,7 +456,7 @@ class _CallScreenState extends State { } }); - final eventErrorListener = emitter.on( + final eventErrorListener = emitter.addListener( EventType.onError, (data) async { data = data as Map; @@ -489,24 +488,24 @@ class _CallScreenState extends State { }, ); - final userRecordingConsentListener = emitter.on(EventType.onUserRecordingConsent, (data) async { + final userRecordingConsentListener = emitter.addListener(EventType.onUserRecordingConsent, (data) async { data = data as Map; ZoomVideoSdkUser? user = ZoomVideoSdkUser.fromJson(jsonDecode(data['user'])); debugPrint('userRecordingConsentListener: user= ${user.userName}'); }); - final callCRCDeviceStatusListener = emitter.on(EventType.onCallCRCDeviceStatusChanged, (data) async { + final callCRCDeviceStatusListener = emitter.addListener(EventType.onCallCRCDeviceStatusChanged, (data) async { data = data as Map; debugPrint('onCallCRCDeviceStatusChanged: status = ${data['status']}'); }); - final originalLanguageMsgReceivedListener = emitter.on(EventType.onOriginalLanguageMsgReceived, (data) async { + final originalLanguageMsgReceivedListener = emitter.addListener(EventType.onOriginalLanguageMsgReceived, (data) async { data = data as Map; ZoomVideoSdkLiveTranscriptionMessageInfo? messageInfo = ZoomVideoSdkLiveTranscriptionMessageInfo.fromJson(jsonDecode(data['messageInfo'])); debugPrint("onOriginalLanguageMsgReceived: content: ${messageInfo.messageContent}"); }); - final chatPrivilegeChangedListener = emitter.on(EventType.onChatPrivilegeChanged, (data) async { + final chatPrivilegeChangedListener = emitter.addListener(EventType.onChatPrivilegeChanged, (data) async { data = data as Map; String type = data['privilege']; debugPrint('chatPrivilegeChangedListener: type= $type'); diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 8c468a2b..9311b25d 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -460,10 +460,6 @@ class _ConfirmLogin extends State { try { authenticated = await auth.authenticate( localizedReason: 'Scan your fingerprint to authenticate', - options: AuthenticationOptions( - useErrorDialogs: true, - stickyAuth: true, - ), authMessages: [ // IOSAuthMessages( // cancelButton: 'cancel', diff --git a/lib/pages/pharmacies/screens/product-details/availability_info.dart b/lib/pages/pharmacies/screens/product-details/availability_info.dart index 4c635507..1f142679 100644 --- a/lib/pages/pharmacies/screens/product-details/availability_info.dart +++ b/lib/pages/pharmacies/screens/product-details/availability_info.dart @@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_deta import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; -import 'package:map_launcher/map_launcher.dart'; +import 'package:map_launcher/map_launcher.dart' as mapLauncher; import 'package:url_launcher/url_launcher.dart'; class AvailabilityInfo extends StatelessWidget { @@ -57,11 +57,10 @@ class AvailabilityInfo extends StatelessWidget { icon: Icon(Icons.location_on), color: Colors.red, onPressed: () async { - await MapLauncher.showMarker( - mapType: MapType.google, - coords: Coords(double.parse(previousModel!.productLocationService[index].latitude!), double.parse(previousModel!.productLocationService[index]!.longitude!)), - title: previousModel!.productLocationService![index].locationDescription!, + await mapLauncher.MapLauncher.marker( + mapLauncher.LocationCoords(double.parse(previousModel!.productLocationService[index].latitude!), double.parse(previousModel!.productLocationService[index]!.longitude!)) ); + }, ), ), diff --git a/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart b/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart index de0b65b2..b2222ea8 100644 --- a/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart +++ b/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart @@ -13,7 +13,7 @@ import 'package:diplomaticquarterapp/widgets/app_map/google_huawei_map.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; -import 'package:geocoding/geocoding.dart'; +import 'package:geocoding/geocoding.dart' hide Location; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:provider/provider.dart'; @@ -68,7 +68,7 @@ class _AddAddressPageState extends State { setState(() {}); }, onCameraIdle: () async { - List placemarks = await placemarkFromCoordinates(_latitude!, _longitude!); + List placemarks = await Geocoding().placemarkFromCoordinates(_latitude!, _longitude!); selectedPlace = placemarks[0]; print(selectedPlace); }, diff --git a/lib/pages/pharmacy/pharmacyContacts.dart b/lib/pages/pharmacy/pharmacyContacts.dart index ab9e56d7..d0e90df1 100644 --- a/lib/pages/pharmacy/pharmacyContacts.dart +++ b/lib/pages/pharmacy/pharmacyContacts.dart @@ -8,7 +8,7 @@ import 'package:flutter_svg/flutter_svg.dart'; import 'package:maps_launcher/maps_launcher.dart'; import 'package:provider/provider.dart'; import 'package:url_launcher/url_launcher.dart'; -import 'package:map_launcher/map_launcher.dart'; +import 'package:map_launcher/map_launcher.dart' as mapLauncher; import 'dart:io' show Platform; class pharmacyContactsPage extends StatefulWidget { @@ -217,19 +217,23 @@ class _pharmacyContactsPageState extends State { child: Row( children: [ InkWell( - onTap: () { - if (Platform.isIOS) { MapLauncher.showMarker( - mapType: MapType.apple, - coords: Coords(double.parse(latitude), - double.parse(longitude)), - title: locationDescription,); - } else { MapLauncher.showMarker( - mapType: MapType.google, - coords: Coords(double.parse(latitude), - double.parse(longitude)), - title: locationDescription, - // description: location.locationName, - ); } + onTap: () async { + await mapLauncher.MapLauncher.marker( + mapLauncher.LocationCoords(double.parse(latitude), + double.parse(longitude)) + ); + // if (Platform.isIOS) { MapLauncher.showMarker( + // mapType: MapType.apple, + // coords: Coords(double.parse(latitude), + // double.parse(longitude)), + // title: locationDescription,); + // } else { MapLauncher.showMarker( + // mapType: MapType.google, + // coords: Coords(double.parse(latitude), + // double.parse(longitude)), + // title: locationDescription, + // // description: location.locationName, + // ); } // MapsLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude), previousModel.productLocationService[index].locationDescription); }, // MapsLauncher.launchCoordinates( diff --git a/lib/widgets/hospital_location.dart b/lib/widgets/hospital_location.dart index 9f7e509f..64be5c9b 100644 --- a/lib/widgets/hospital_location.dart +++ b/lib/widgets/hospital_location.dart @@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; -import 'package:map_launcher/map_launcher.dart'; +import 'package:map_launcher/map_launcher.dart' as mapLauncher; import 'package:provider/provider.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -79,17 +79,9 @@ class HospitalLocation extends StatelessWidget { Icons.location_on, TranslationBase.of(context).locationa, () async { - await MapLauncher.showMarker( - mapType: MapType.google, - coords: Coords(double.parse(location!.latitude!), double.parse(location!.longitude!)), - title: location!.locationName!, - ).catchError((err) { - MapLauncher.showMarker( - mapType: Platform.isIOS ? MapType.apple : MapType.google, - coords: Coords(double.parse(location!.latitude!), double.parse(location!.longitude!)), - title: location!.locationName!, - ); - }); + await mapLauncher.MapLauncher.marker( + mapLauncher.LocationCoords(double.parse(location!.latitude!), double.parse(location!.longitude!)) + ); }, ), SizedBox(height: 10), diff --git a/lib/widgets/pickupLocation/PickupLocationFromMap.dart b/lib/widgets/pickupLocation/PickupLocationFromMap.dart index c1c0285c..c13df76d 100644 --- a/lib/widgets/pickupLocation/PickupLocationFromMap.dart +++ b/lib/widgets/pickupLocation/PickupLocationFromMap.dart @@ -67,7 +67,7 @@ class _PickupLocationFromMapState extends State { setState(() {}); }, onCameraIdle: () async { - List placemarks = await placemarkFromCoordinates(latitude, longitude); + List placemarks = await Geocoding().placemarkFromCoordinates(latitude, longitude); selectedPlace = placemarks[0]; print(selectedPlace); }, diff --git a/pubspec.yaml b/pubspec.yaml index b7bf5514..e7bc0780 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,31 +18,31 @@ dependencies: sdk: flutter webview_flutter: ^4.8.0 - app_links: ^6.4.0 + app_links: ^7.2.1 http: ^1.4.0 - connectivity_plus: 6.1.0 + connectivity_plus: ^7.3.1 async: ^2.8.1 audio_wave: ^0.1.4 provider: ^6.0.5 #Dependency Injection - get_it: ^8.0.3 + get_it: ^9.3.0 # health: ^13.1.1 fl_chart: ^1.0.0 - camera: ^0.11.2 - permission_handler: ^12.0.0+1 + camera: ^0.12.1 + permission_handler: ^13.0.2 # flutter_html: ^3.0.0-beta.2 flutter_widget_from_html: ^0.17.0 # Pagnation pull_to_refresh: ^2.0.0 - local_auth: ^2.1.7 + local_auth: ^3.0.2 localstorage: ^6.0.0 maps_launcher: ^3.0.0+1 url_launcher: ^6.3.1 url_launcher_ios: ^6.3.2 shared_preferences: ^2.5.3 # fluttertoast: ^8.0.8 - fluttertoast: ^8.2.12 + fluttertoast: ^10.0.0 flutter_progress_hud: ^2.0.2 percent_indicator: ^4.2.3 @@ -68,18 +68,18 @@ dependencies: huawei_push: ^6.14.0+300 # hijri_gregorian_calendar: # path: /Users/aamir/StudioProjects/hijri_gregorian_calendar - hijri_gregorian_calendar: ^0.0.3 + hijri_gregorian_calendar: ^0.2.0 # Qr code Scanner - location: ^8.0.1 + location: ^10.0.2 barcode_scan2: ^4.5.1 flutter_rating_bar: ^4.0.1 - syncfusion_flutter_calendar: ^29.2.11+1 + syncfusion_flutter_calendar: ^34.2.9 # timezone: 0.10.1 # SVG Images flutter_svg: ^2.0.8 - manage_calendar_events: 2.0.3 + manage_calendar_events: ^2.2.0 # icalendar_plus: ^0.0.6 flutter_inappwebview: ^6.1.5 circular_countdown_timer: ^0.2.0 @@ -91,12 +91,12 @@ dependencies: device_calendar: ^4.3.3 geolocator: ^14.0.2 geolocator_android: ^5.0.2 - geocoding: ^4.0.0 + geocoding: ^5.0.0 jiffy: ^6.2.1 #Flutter WebRTC # screen_brightness: ^2.1.5 - map_launcher: ^3.0.1 + map_launcher: ^6.0.0 flutter_countdown_timer: ^4.1.0 carousel_slider: ^5.0.0 #Dependencies for video call implementation @@ -104,22 +104,22 @@ dependencies: # wakelock: ^0.6.2 wakelock_plus: ^1.3.2 after_layout: ^1.1.0 - cached_network_image: ^3.4.1 + cached_network_image: ^4.0.0 flutter_tts: ^4.2.3 flutter_nfc_kit: ^3.6.0 #geofencing: any speech_to_text: ^7.2.0 - in_app_update: ^4.2.2 + in_app_update: ^5.0.0 in_app_review: ^2.0.10 badges: ^3.1.2 - youtube_player_flutter: ^9.1.0 + youtube_player_flutter: ^10.0.1 # shimmer: ^3.0.0 # huawei_hmsavailability: ^6.11.0+301 gms_check: ^1.0.4 huawei_location: ^6.11.0+301 - share_plus: ^11.0.0 + share_plus: ^12.0.2 auto_size_text: ^3.0.0 equatable: ^2.0.3 wave: ^0.2.0 @@ -131,16 +131,16 @@ dependencies: logger: ^2.0.2+1 network_info_plus: any - flutter_zoom_videosdk: 1.12.10 + flutter_zoom_videosdk: ^2.5.10 dart_jsonwebtoken: ^3.2.0 win32: ^5.5.4 - firebase_crashlytics: ^4.3.8 - firebase_messaging: ^15.2.8 - firebase_analytics: ^11.5.1 + firebase_crashlytics: ^5.4.0 + firebase_messaging: ^16.7.0 + firebase_analytics: ^12.6.0 cloudflare_turnstile: ^3.2.0 - device_info_plus: ^11.5.0 + device_info_plus: ^12.4.0 lottie: ^3.3.1 - google_fonts: ^6.2.1 + google_fonts: ^8.2.1 google_maps_place_picker_mb_v2: ^1.0.1 # vital_sign_camera: @@ -158,7 +158,7 @@ dev_dependencies: flutter_test: sdk: flutter build_runner: ^2.1.5 - + flutter_spm_doctor: ^0.2.0 flutter: uses-material-design: true