【问题标题】:How can I open profile Linkedin application from my Flutter app?如何从我的 Flutter 应用程序打开个人资料 Linkedin 应用程序?
【发布时间】:2021-10-06 21:26:51
【问题描述】:

我想从我的 Flutter 应用程序中打开 LinkedIn 用户个人资料详细信息。

【问题讨论】:

    标签: flutter dart flutter-dependencies dart-pub


    【解决方案1】:

    试试下面的代码希望对你有帮助。

    您必须使用来自hereurl_launcher 包,在您的 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';
        }
      }
    

    【讨论】:

      【解决方案2】:

      如果您希望它在您的应用程序中本地打开或将用户数据从 LinkedIn 网站下载到您的应用程序,您可以查看他们的 APIs,您可以调用并响应获取的数据。

      【讨论】:

        猜你喜欢
        • 2016-06-29
        • 1970-01-01
        • 1970-01-01
        • 2015-12-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-04-15
        • 2011-12-12
        相关资源
        最近更新 更多