Transforms a Stream so that will only emit items from the source sequence
if a window has completed, without the source sequence emitting
another item.
Converts each emitted item into a new Stream using the given mapper
function. The newly created Stream will be be listened to and begin
emitting items, and any previously created Stream will stop emitting.
Extends the Stream with the ability to convert one stream into a new Stream
whenever the source emits an item. Every time a new Stream is created, the
previous Stream is discarded.
@private
Helper method which forwards the events from an incoming Stream
to a new StreamController.
It captures events such as onListen, onPause, onResume and onCancel,
which can be used in pair with a ForwardingSink