Created
January 24, 2019 14:54
-
-
Save clairtonluz/8ce0d321fbff0039eb631102d927f9e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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