launchMaps static method

dynamic launchMaps(
  1. List<double> geolocation,
  2. String? name, {
  3. 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);
}