Ad

How To Make Profile As Link To Share

I am going to create a chat application using flutter with the firebase database, I want to add a profile sharing feature that opens a specific profile by its profile link, e.g. In Telegram, we have our own profile id and we can share it as https://t.me/username, just of one click it opens with telegram app with that specific user profile. Then how do I do this?

Ad

Answer

Firebase Dynamic Links

Firebase Dynamic Links is the service that does what you're describing. The documentation states the following:

You create a Dynamic Link either by using the Firebase console, using a REST API, iOS or Android Builder API, or by forming a URL by adding Dynamic Link parameters to a domain specific to your app. These parameters specify the links you want to open, depending on the user's platform and whether your app is installed.

Setup

  1. First, you will need to enable it for your Firebase project through your Firebase console.
  2. Then, you will include its official package for Flutter called firebase_dynamic_links in your app.
  3. You can create Dynamic Links programmatically with your app or maybe Cloud Functions or by using the Firebase console.
  4. Use the firebase_dynamic_links package to check if a Dynamic Link was passed to it when your app opens.
  5. You can view the analytics data to track the performance of your Dynamic Links in the Firebase console.
Ad
source: stackoverflow.com
Ad