How can I send parameters to deep links in Flutter?
If you need more advance Deep linking experience with specific domain name, Google firebase has a great product named Dynamic links and it is free.
There is an official package for Flutter to use as firebase_dynamic_links.
Dynamic Links eliminates DeepLink weaknesses. With Dynamic Links, you treat on all platforms such as Android, iOS and web in a similar way. It seamlessly transits users from your mobile website to the equivalent content within your app (if the user has not installed your app on her/his device, the content would be shown after app installation). Furthermore, you can see the log of a Dynamic Link in the Firebase console. Another feature is to find out where the user clicked on the link.more info
![maxcodemachine](https://lh6.googleusercontent.com/-jSMla0dfSds/AAAAAAAAAAI/AAAAAAAAAAA/AMZuucnrfFSGVMG6bpEzHozwLhZMJPjmgQ/photo.jpg?sz=256)
maxcodemachine
Updated on December 26, 2022Comments
-
maxcodemachine over 1 year
I've managed to set up a deep link on Flutter for my app (currently only on android), here is the intent filter in the AndroidManifest.xml file to set up the deep link (using example host name and prefix):
<intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="http" android:host="example.com" android:pathPrefix="/prefix"/> </intent-filter>
This works, whenever I access http://example.com/prefix on my phone, it suggests to open my app.
Now, I want to be able to pass in parameters to the deep link, maybe a URL parameter like http://example.com/prefix?code=abc123. So I can read it from my Flutter app like
getParam('code')
returnsabc123
for example.Is this possible?
-
maxcodemachine over 3 yearsThank you for the information. Dynamic Links sound interesting, will look into them.
-
RamithDR almost 3 yearsWere you able to get data from clicked web link using Firebase dynamic links?
-
A.J Alhorr almost 3 yearsreally stupid question, do you need to be using firebase db to use dynamic links or are they unrelated?
-
Beginner_ over 2 yearsI think Firebase Dynamic Links is not useful for including parameters in URL.