FromCallableStream<T> constructor

FromCallableStream<T>(
  1. FutureOr<T> callable(), {
  2. bool reusable = false,
})

Construct a Stream that, when listening to it, calls a function you specify and then emits the value returned from that function. reusable indicates whether this Stream can be listened to multiple times or not.

Implementation

FromCallableStream(this.callable, {bool reusable = false})
    : _isReusable = reusable;