launchMaps static method

void launchMaps({
  1. required String title,
  2. required double latitude,
  3. required double longitude,
  4. String? description,
  5. int? zoom,
  6. Map<String, String>? extraParams,
})

Implementation

static void launchMaps({
  required String title,
  required double latitude,
  required double longitude,
  String? description,
  int? zoom,
  Map<String, String>? extraParams,
}) async {
  try {
    final availableMaps = await MapLauncher.installedMaps;

    await availableMaps.first.showMarker(
      coords: Coords(
        latitude,
        longitude,
      ),
      title: title,
      description: description,
      zoom: zoom,
      extraParams: extraParams,
    );
  } catch (e) {
    LoggerService.logInfo('Utils launchMaps: could not launch string: $e)');
  }
}