在flutter代码中打开映射是这样的。它正在谷歌上工作,但没有推出苹果地图网址。可能是小错误或遗漏了什么
String addrs = '';
addrs = '###';
String googleUrl =
'comgooglemaps://?q=${Uri.encodeComponent(addrs)}¢er=lat,lng';
String appleUrl =
'https://maps.apple.com/?q=${addrs}&sll=lat,lng';
if (await canLaunch("comgooglemaps://")) {
print('launching com googleUrl');
await launch(googleUrl);
} else if (await canLaunch(appleUrl)) {
print('launching apple url');
await launch(appleUrl);
} else {
print('Could not launch url');
}```
请像对谷歌地图一样对苹果地图的URL进行编码。