listen abstract method
Adds a subscription to this stream.
Returns a StreamSubscription which handles events from this stream using the provided onData
and onDone
handlers.
The handlers can be changed on the subscription, but they start out as the provided functions.
Implementation
StreamSubscription<T> listen(void Function(T data)? onData, {void Function()? onDone});