launchMaps static method
dynamic
launchMaps(
- List<double> geolocation,
- String? name, {
- DirectionsMode? directionsMode,
})
Implementation
static launchMaps(List<double> geolocation, String? name, {DirectionsMode? directionsMode}) async {
LatLng location = LatLng(Angle.degree(geolocation[0]), Angle.degree(geolocation[1]));
final availableMaps = await MapLauncher.installedMaps;
await availableMaps.first.showDirections(
destination: Coords(location.longitude.degrees, location.latitude.degrees),
destinationTitle: name ?? "",
directionsMode: directionsMode ?? DirectionsMode.walking);
}