HookContextStateMixin<W extends StatefulWidget> mixin
Properties
-
context
→ BuildContext
-
The location in the tree where this widget builds.
no setterinherited
-
debugDoingBuild
→ bool
-
no setterinherited
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
mounted
→ bool
-
Whether this State object is currently in a tree.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
widget
→ W
-
The current configuration.
no setterinherited
Methods
-
activate()
→ void
-
Called when this object is reinserted into the tree after having been
removed via deactivate.
inherited
-
addPostBuildCallback(void callback())
→ void
-
Registers
callback
to be called after the current build.
inherited
-
build(BuildContext context)
→ Widget
-
Describes the part of the user interface represented by this widget.
override
-
deactivate()
→ void
-
Called when this object is removed from the tree.
inherited
-
debugDescribeChildren()
→ List<DiagnosticsNode>
-
Returns a list of
DiagnosticsNode
objects describing this node's
children.
inherited
-
debugFillProperties(DiagnosticPropertiesBuilder properties)
→ void
-
Add additional properties associated with the node.
override
-
debugMarkWillReassemble()
→ void
-
Marks the next build as a reassemble, allowing hooks to be added or removed.
inherited
-
didChangeDependencies()
→ void
-
Called when a dependency of this State object changes.
inherited
-
didUpdateWidget(covariant W oldWidget)
→ void
-
Called whenever the widget configuration changes.
inherited
-
dispose()
→ void
-
Called when this object is removed from the tree permanently.
override
-
disposeHooks()
→ void
-
Disposes all hooks in this HookContext and marks is as unmounted.
inherited
-
getUnsafe(Type type, {bool? watch})
→ dynamic
-
Retrieves the value of the requested
type
and optionally watches for its change.
Returned values are guaranteed to be of type type
or valueNotFound when it isn't found.
If watch
is not set, implementation should perform an educated guess (e.g. based on whether it's called during
a build).
Exact meaning of "watching" depends on the implementation and may not be supported.
override
-
initState()
→ void
-
Called when this object is inserted into the tree.
inherited
-
markNeedsBuild()
→ void
-
Requests that this HookContext should be rebuilt.
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
performBuild(BuildContext context)
→ Widget
-
-
reassemble()
→ void
-
Called whenever the application is reassembled during debugging, for
example during hot reload.
override
-
setState(VoidCallback fn)
→ void
-
Notify the framework that the internal state of this object has changed.
inherited
-
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style})
→ DiagnosticsNode
-
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString({DiagnosticLevel minLevel = DiagnosticLevel.info})
→ String
-
A string representation of this object.
inherited
-
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug})
→ String
-
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug})
→ String
-
Returns a one-line detailed description of the object.
inherited
-
toStringShort()
→ String
-
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
-
triggerPostBuildCallbacks()
→ void
-
Triggers all callbacks registered in the previous build.
inherited
-
use<T>(Hook<T> hook)
→ T
-
Registers
hook
in this HookContext and returns its value.
inherited
-
wrapBuild<T>(T build())
→ T
-
Performs
build
in this HookContext.
inherited