Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import 'package:url_launcher/url_launcher.dart';
class MapUtils {
static openMap(double latitude, double longitude) async {
String googleUrl = 'https://www.google.com/maps/search/?api=1&query=$latitude,$longitude';
if (await canLaunch(googleUrl)) {
await launch(googleUrl);
} else {
throw 'Não foi possível abrir o mapa.';
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.