如何从我的Ffltter应用程序打开个人资料LinkedIn应用程序? [英] How can I open profile Linkedin application from my Flutter app?

查看:5
本文介绍了如何从我的Ffltter应用程序打开个人资料LinkedIn应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从Ffltter应用程序中打开LinkedIn用户档案详细信息。

推荐答案

尝试以下代码,希望对您有帮助。

您必须使用url_Launcherhere在pubspec.yaml文件中添加此依赖项

创建一个小工具

InkWell(
      hoverColor: Colors.transparent,
      child: Image.network(
        'https://cdn-icons-png.flaticon.com/512/174/174857.png',
        width: 70,
        height: 70,
      ),
      onTap: () => _linkedin(),
    )

创建ONTAP函数

_linkedin() async {
    const url =
        'https://www.linkedin.com';// or add your URL here
    if (await canLaunch(url)) {
      await launch(url);
    } else {
      throw 'Could not launch $url';
    }
  }

这篇关于如何从我的Ffltter应用程序打开个人资料LinkedIn应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆