Support web dynamic links #9115
-
I want to be able to generate dynamic links on my flutter web version and route dynamic links to a page in my web app via FDL. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Turns out, it's really easy to do on Web. I'm really not sure why it's not included in the packages yet. You just have to query the firebase short links API with a http POST. Details on how to implement are located here Since flutter web is a single-page PWA, it uses # notation to route. Thus to make the FDL link work, you have to have any fallback URLs that point to the web app contain a # or %23 (url encoded). Sometimes this is enough, but sometimes it isn't. To be sure it works every time, in the main function, you just have to intercept the FDL and reroute it according to what's after the #. |
Beta Was this translation helpful? Give feedback.
Turns out, it's really easy to do on Web. I'm really not sure why it's not included in the packages yet. You just have to query the firebase short links API with a http POST. Details on how to implement are located here
https://firebase.google.com/docs/reference/dynamic-links/link-shortener
Since flutter web is a single-page PWA, it uses # notation to route. Thus to make the FDL link work, you have to have any fallback URLs that point to the web app contain a # or %23 (url encoded). Sometimes this is enough, but sometimes it isn't. To be sure it works every time, in the main function, you just have to intercept the FDL and reroute it according to what's after the #.
For example, a fallbac…