Closed asaarnak closed 1 year ago
For anyone else with this problem, feel free to use my fork.
maps_launcher:
git:
url: https://github.com/jbacco/flutter-maps-launcher
ref: master # Fix for: https://github.com/pikaju/flutter-maps-launcher/issues/27
Or if you want to fork it yourself, just go into the android/build.gradle file and change:
ext.kotlin_version = '1.3.50'
to
ext.kotlin_version = '1.6.10'
Alternatively:
Future<void> _launchMap(String query) async {
if (Platform.isAndroid) {
await launchUrl(Uri(scheme: 'geo', host: '0,0', queryParameters: {'q': query}));
} else if (Platform.isIOS) {
await launchUrl(Uri.https('maps.apple.com', '/', {'q': query}));
} else {
await launchUrl(Uri.https('www.google.com', '/maps/search/', {'api': '1', 'query': query}));
}
}
Since Android Gradle plugin 7.3.0 minimum Kotlin plugin version is 1.5.20 https://developer.android.com/studio/releases/gradle-plugin#min-kotlin-version
Building app gives error: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher. The following dependencies do not satisfy the required version: project ':maps_launcher' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50