launchMapsUrl method

void launchMapsUrl(
  1. double latitude,
  2. double longitude
)

Implementation

void launchMapsUrl(double latitude, double longitude) async {
  final url =
      'https://www.google.com/maps/search/?api=1&query=$latitude,$longitude';
  // ignore: deprecated_member_use
  if (await canLaunch(url)) {
    // ignore: deprecated_member_use
    await launch(url);
  } else {
    throw 'Could not launch $url';
  }
}