Deep linking in flutter app using uni_links

loic NGOU
2 min readOct 4, 2019

--

flutter is a great framework especially when it’s graphical interfaces, two days ago I decided to implement deep linking in my flutter application, so I came across the uni_links plugin it’s exactly what I wanted, however it is not easy to take in hand for a beginner so when I successfully performed deep linking in my application, I decided to share with the community.

source: https://support.appsflyer.com/hc/en-us/articles/360000724598-Deep-linking-with-OneLink-best-practices

How does it work ?

uni_links is a wrapper for deep linking on native Android an IOS platform , for more information check this for android , Unfortunately i don’t have a mac book to test IOS app , this tutorial is especially for android.

Installation and Configuration

You first need to install uni_links plugin , open pubspec.yaml and the code below on app dependencies domain :

uni_links: ^0.2.0

Now for android user , edit android\app\src\main\AndroidManifest.xml add new intent filter to detect incoming links , there are many type of linking check the official docs to know more about . In this example , we will configure our intent to detect links like tdz://genius-team.com , that is how my Android manifest file looks like :

When you have successfully configured your android manifest file , then we can move to the dart side , edit the starting screen file of your app , you need to build this with a StreamBuilder because unilinks suscribe to a stream to detect whether app have started normally or by the links configured.

Conclusion

That’s is all for this tutorial hope it will be helpful , left a clap if you have liked , thank you.

--

--

loic NGOU

I am a self starter web and mobile developer, who like to play with flutter, laravel, strapijs and vue.