ObserverController class
An interface for observing the behavior of Controller instances.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onChange(
BaseController controller, StateChange change) → void -
Called whenever a StateChange occurs in any
controller
Achange
occurs when a new state is emitted. onChange is called before a controller's state has been updated. -
onClose(
BaseController controller) → void - Called whenever a Controller is closed. onClose is called just before the Controller is closed and indicates that the particular instance will no longer emit new states.
-
onCreate(
BaseController controller) → void - Called whenever a Controller is instantiated. In many cases, a StateController may be lazily instantiated and onCreate can be used to observe exactly when the StateController instance is created.
-
onError(
BaseController controller, Object error, StackTrace stackTrace) → void -
Called whenever an
error
is thrown in any Controller or StateController. ThestackTrace
argument may be StackTrace.empty if an error was received without a stack trace. -
onEvent(
Controller controller, Object? event) → void -
Called whenever an
event
isadded
to anycontroller
with the givencontroller
andevent
. -
onTransform(
Controller controller, TransformController transition) → void -
Called whenever a transition occurs in any
controller
with the givencontroller
andtransition
. Atransition
occurs when a newevent
isadded
andmapEventToState
executed. onTransform is called before acontroller
's state has been updated. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited