gotoAppleMap static method
Apple Map / 苹果地图
Implementation
static Future<bool> gotoAppleMap(longitude, latitude) async {
var url = 'http://maps.apple.com/?&daddr=$latitude,$longitude';
bool canLaunchMap = await canLaunchUrl(Uri.parse(url));
if (!canLaunchMap) {
Utils.toast(('打开失败')); // "Open failed"
return false;
}
await launchUrl(
Uri.parse(url),
mode: LaunchMode.externalApplication,
);
return canLaunchMap;
}