llfbandit / app_links

Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler for Flutter.
https://pub.dev/packages/app_links
Apache License 2.0
224 stars 81 forks source link

Only the latest stream listener receives events #123

Closed OutdatedGuy closed 6 months ago

OutdatedGuy commented 6 months ago

Describe the bug

I have setup two different stream listeners on two different pages in my application. These are required so perform different tasks depending upon which App/Universal link is opened.

However, only the stream listener that is setup later (on the 2nd page) receives all the events. And the 1st one does't get any.

AppLinks().uriLinkStream.listen(_handleAppLink);

Does it related to

Does the example project work?

Did you fully read the instructions for the targeted platform before submitting this issue?

Yes.

Uploaded your files to webserver, HTTPS, direct connection, scheme pattern setup, ...

llfbandit commented 6 months ago

AppLinks is singleton. From here, you can wrap it and publish the stream as a broadcast stream or/and create as many filtered streams you need.

AppLinks().uriLinkStream.asBroadcastStream()

OutdatedGuy commented 6 months ago

Thanks for the info. However, now I have to create and maintain my own stream now.

Can we get a AppLinks().uriLinkBroadcastStream method that listens to AppLinks().uriLinkStream?