Signatures
Two streaming methods, matching the two non-streaming ones:With a subscription
listen gives you onError and onDone separately, which is usually what a widget wants:
Cancelling
Cancel the subscription:dispose, or the generation keeps running after the widget is gone and
setState throws.
Driving a widget with StreamBuilder
ValueNotifier and rebuild only the Text widget.
Errors
Failures arrive through the stream’s error channel, soonError on a subscription, or a
try/catch around the await for: