openMap static method
Implementation
static openMap(double lat, double lng) async {
String googleUrl =
'https://www.google.com/maps/search/?api=1&query=$lat,$lng';
if (await canLaunchUrl(Uri.parse(googleUrl))) {
await launchUrl(Uri.parse(googleUrl), mode: LaunchMode.externalApplication);
} else {
throw 'Unable open the map.';
}
}