ScopeController class abstract AsyncControllerScope
An object with a lifecycle of its own, owned by a scope.
The three methods the scope calls are sealed, so a controller never has to
remember to chain to super: performInit runs init, performUnmount
runs onUnmount once, and performDispose runs what is left of the
teardown and then dispose. Everything a controller has to write is in the
three hooks below them.
A controller can also be driven by hand -- in a test, say -- by calling the same three methods in that order.
Constructors
Properties
Methods
-
dispose(
) → FutureOr< void> - Releases what init acquired; awaited.
-
init(
) → Future< void> - Acquires whatever the controller needs; awaited.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onUnmount(
) → void - Lets go of whatever cannot wait for dispose.
-
performDispose(
) → Future< void> - Runs what is left of the teardown and then dispose, once.
-
performInit(
) → Future< void> - Runs init, once. Called by the scope.
-
performUnmount(
) → void - Runs onUnmount, once. Called by the scope.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited