launchGeoPoint static method

dynamic launchGeoPoint(
  1. double latitude,
  2. double longitude, {
  3. LaunchMode mode = LaunchMode.platformDefault,
})

Launch GeoPoint app with the given latitude and longitude.

Implementation

static launchGeoPoint(double latitude, double longitude,
    {LaunchMode mode = LaunchMode.platformDefault}) async {
  final String url =
      'https://www.google.com/maps/search/?api=1&query=$latitude,$longitude';
  if (await canLaunchUrlString(url)) {
    await launchUrlString(
      url,
      mode: mode,
    );
  } else {
    showErrorNotice("Error", "Could not launch the $url");
    throw 'Could not launch';
  }
}