HookContext class abstract interface

A context in which hooks can be used.

It's strongly recommended to use HookContextMixin when implementing HookContext.

Implemented types
Implementers
Available Extensions

Constructors

HookContext()

Properties

hashCode int
The hash code for this object.
no setterinherited
mounted bool
Whether this HookContext is still valid.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addPostBuildCallback(void callback()) → void
Registers callback to be called after the current build.
getUnsafe(Type type) → dynamic
inherited
markNeedsBuild() → void
Requests that this HookContext should be rebuilt.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
use<T>(Hook<T> hook) → T
Registers hook in this HookContext and returns its value.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

current HookContext?
The currently active HookContext.
no setter

Static Methods

wrap<T>(HookContext context, T callback()) → T
Runs callback with context as the current HookContext.