Open NZPIF opened 1 year ago
FWIW we can't use https://github.com/mattermoran/map_launcher because we don't have lat/lng and need the "query" ability.
I'm experiencing the same issue. I'm using the same versions of url_launcher and maps_launcher as above. I tried changing the url_launcher to 6.1.0 (as is the earliest version in the maps pubspec) but it still is crashing.
I've done some digging and the problem isn't with this package, it's a problem within url_launcher
Ref: https://stackoverflow.com/questions/76934676/flutter-url-launcher-crashes-opening-apple-maps-on-ios
For my purposes, I'm probably going to fork url_launcher and ignore the error and keep checking whenever url_launcher is upgraded.
I did see some threads talking about how maps_launcher failed if there were unusual characters in the string so I have this in my code but it doesn't seem to make a difference:
String get cleanValue => value.replaceAll(RegExp(r'[^\w ]+'), ' ');
String get cleanValue2 => cleanValue.replaceAll(" ", " ");
I was able to implement url_launcher without a problem... I'm thinking url_launcher made a change at some point and this package's implementation needs to be updated possibly. I tried falling back to older versions of url_launcher for this package but still couldn't get it to work.
Looking for a fix for this...
Code is relatively simple, the maps query is set up correctly and the location found but this error is thrown on both a device and simulator:
The maps app does open and the search is run but on returning to the app it's frozen with the error showing in the editor.
The class was stable and no errors until the maps launcher was added.
The app is using url launcher successfully.
Some details about my setup: Flutter 3.10.6 • channel stable • https://github.com/flutter/flutter.git Framework • revision f468f3366c (2 weeks ago) • 2023-07-12 15:19:05 -0700 Engine • revision cdbeda788a Tools • Dart 3.0.6 • DevTools 2.23.1
from pubspec.yaml url_launcher: ^6.1.12 maps_launcher: ^2.2.0