使用第三方库url_launcher

    • pubspec.yaml
    1. dependencies:
    2. url_launcher: ^5.1.3
    • 方法
    1. _launchURL() async {
    2. const url = 'xxx'; // 这个xx就是唤起三方应用的重要因素
    3. // taobao://item.taobao.com/item.html?id=41700658839
    4. if (await canLaunch(url)) { // 判断当前手机是否安装某app. 能否正常跳转
    5. await launch(url);
    6. } else {
    7. throw 'Could not launch $url';
    8. }
    9. }
    • url schema 汇总

    QQ: mqq://
    微信: weixin://
    京东: openapp.jdmoble://
    淘宝: taobao://
    美团: imeituan://
    点评: dianping://
    1号店: wccbyihaodian://
    支付宝: alipay://
    微博: sinaweibo://
    腾讯微博: TencentWeibo://
    weico微博: weico://
    知乎: zhihu://
    豆瓣fm: doubanradio://
    网易公开课: ntesopen://
    Chrome: googlechrome://
    QQ浏览器: mqqbrowser://
    uc浏览器: ucbrowser://
    搜狗浏览器: SogouMSE://
    百度地图: baidumap:// bdmap://
    优酷: youku://
    人人: renren://
    我查查: wcc://
    有道词典: yddictproapp://
    微盘: sinavdisk://
    名片全能王: camcard://