Home > front end >  How can I open profile Linkedin application from my Flutter app?
How can I open profile Linkedin application from my Flutter app?

Time:10-06

I want to open LinkedIn user profile details from my flutter appliction.

CodePudding user response:

Try below code hope its helpful to you.

You must use url_launcher package from here add this dependency in your pubspec.yaml file

create one widget

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

Create ontap function

_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';
    }
  }

CodePudding user response:

If you want it to be natively open in your application or get the user's data from LinkedIn website down to your app, you can check out their APIs that you can call and react to the data fetched.

  • Related