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.
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.