openMap static method
Opens up google map with the given mapUrl
in the given launchMode
.
Implementation
static Future openMap({
required String mapUrl,
LaunchMode launchMode = LaunchMode.externalApplication,
}) async {
try {
final uri = Uri.parse(mapUrl);
await launchUrl(uri, mode: launchMode);
} catch (error, stackTrace) {
ErrorLogger.instance.logError(
error: error,
stackTrace: stackTrace,
file: "url_launcher_helper",
event: "openMap",
);
return Future.error(error);
}
}