uriLinkStream top-level property
A convenience transformation of the linkStream to a Stream<Uri>
.
If the link is not valid as a URI or URI reference, a FormatException is thrown.
If the app was stared by a link intent or user activity the stream will
not emit that initial uri - query either the getInitialUri
instead.
Implementation
late final uriLinkStream = linkStream.transform<Uri?>(
StreamTransformer<String?, Uri?>.fromHandlers(
handleData: (String? link, EventSink<Uri?> sink) {
if (link == null) {
sink.add(null);
} else {
sink.add(Uri.parse(link));
}
},
),
);