BlocController class

Provides a BLoC view controller interface to a class. Provides a PublishSubject stream that can be subscribed to for updates. Also exposes a StreamSink and a Observable for more control over the output. Updates are typically triggered by calling the publishUpdate method.

Implementers

Constructors

BlocController()

Properties

sink → StreamSink<BlocController>
read-only
stream → Observable<BlocController>
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
Closes the underlying stream. Inheriting classes that overload this method must call super.dispose().
@mustCallSuper
onError(Object error, StackTrace stackTrace) → void
Method that is called when the stream reports an error. Prints the error message by default.
@protected
postUpdatePublished() → void
Method that is called when publishUpdate is called, after the stream is notified. Does nothing by default.
@protected
preUpdatePublished() → void
Method that is called when publishUpdate is called but before the stream is notified. Does nothing by default.
@protected
publishUpdate() → Future<void>
Notifies the underlying stream of an update. Passes a reference to this object to the stream.
subscribeToUpdates(void onUpdate(BlocController), { void onError(Error, StackTrace), void onDone() }) → StreamSubscription
Registers the given callback methods with the underlying stream and returns the resulting StreamSubscription.
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