
我找到了解决方案。
要打开whatsapp:
var whatsappUrl ="whatsapp://send?phone=$phone";await canLaunch(whatsappUrl)? launch(whatsappUrl):print("open whatsapp app link or do a snackbar with notification that there is no whatsapp installed");要打开Messenger或Facebook:
首先获得缩短的URL
如果您的facebook个人资料是
facebook.com/yourNamefacebook
url将是
fb.me/yourName,使者URL将是
m.me/yourName
那你做
launch("http://$messengerUrl");Facebook网站会通过URL浏览器自动打开应用程序中的链接。如果未安装任何应用,它将转到应用/播放商店
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)