I receive a firebase dynamic link in initState.
This works great if the app is completely off. But if the app was running before clicking the link, initState is not called again, thus the dynamiclink is not processed.
Should I try to process the firebase dynamic link through WidgetsBindingObserver (for a similar effect to onResume in Android)? If not, what would be the proper way?
In the Firebase console, open the Dynamic Links section. If you have not already set up a domain for your Dynamic Links, click the Get Started button and follow the prompts. If you already have a Dynamic Links domain, take note of it.
Set Up URL Prefix in the Firebase ConsoleOpen the Firebase console and select your Firebase project in which you want to add deep linking. Create an Android and IOS app in the Firebase project. Open Dynamic Links from the side drawer's Grow section. For creating a domain for the link, click on the Get Started button.
Dynamic Links are deep links into an app that work whether or not users have installed the app yet. When users open a Dynamic Link into an app that is not installed, the app's Play Store page opens, where users can install the app. After users install and open the app, the app displays the deep-linked content.
The created short Dynamic Link will not expire. Repeated calls with the same long Dynamic Link or Dynamic Link information will produce the same short Dynamic Link. The Dynamic Link domain in the request must be owned by requester's Firebase project.
I had the same problem and I solved using WidgetsBindingObserver
to listen when the app is foreground, but I found an issue on iOS.
I wrote a post about it, you can check it:
https://medium.com/@diegoveloper/flutter-firebase-dynamic-link-6f1b79278ce0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With