leanflutter / uni_links_desktop

A desktop (supports macOS and Windows) implementation of uni_links plugin.
https://pub.dev/packages/uni_links_desktop
MIT License
28 stars 15 forks source link

UniLinksDesktop linkStream is not a broadcast stream #1

Closed tobolski closed 2 years ago

tobolski commented 2 years ago

Throws an exception when trying to listen to the stream for the second time. Stream has already been listened to.

According to uni_links_platform_interface, linkStream should return: A broadcast stream for receiving incoming link change events. uni_links_platform_interface.dart

In your implementation:

final _linkStreamController = StreamController<String?>();
(...)
Stream<String?> get linkStream => _linkStreamController.stream;

Which is not a broadcast stream.

lijy91 commented 2 years ago

Please update to v0.1.2