StreamedResource<T> class

Wraps an AsyncResource, providing a stream of its outputs and a sink tied to AsyncResource.get().

Remember to initialize the stream after it is created. For example:

res = StreamedResource(resource);
res.sink.add(false);

Constructors

StreamedResource(AsyncResource<T> resource)

Properties

data → T
Synchronously get's the underlying resource's current data.
read-only
resource AsyncResource<T>
final
sink → Sink<bool>
The value passed will be forwarded to AsyncResource.get(forceReload: value).
read-only
stream → Stream<T>
The output stream of values retrieved from AsyncResource.get().
read-only
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

dispose() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited