HookState<R, T extends Hook<R>> class abstract

The logic and internal state for a HookWidget

Mixed-in types

Constructors

HookState()

Properties

context BuildContext
Equivalent of State.context for HookState
no setter
debugHasShortDescription bool
Whether or not the devtool description should skip debugFillProperties.
no setter
debugLabel String?
A label used by the devtool to show the state of a Hook.
no setter
debugSkipValue bool
A flag to prevent showing debugValue in the devtool for a Hook that returns nothing.
no setter
debugValue Object?
The value shown in the devtool.
no setter
hashCode int
The hash code for this object.
no setterinherited
hook → T
Equivalent of State.widget for HookState.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) → R
Called everytime the HookState is requested.
deactivate() → void
Equivalent of State.deactivate for HookState.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
didUpdateHook(T oldHook) → void
Equivalent of State.didUpdateWidget for HookState.
dispose() → void
Equivalent of State.dispose for HookState.
initHook() → void
Equivalent of State.initState for HookState.
markMayNeedRebuild() → void
Mark the associated HookWidget as potentially needing to rebuild.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reassemble() → void
In addition to this method being invoked, it is guaranteed that the build method will be invoked when a reassemble is signaled. Most widgets therefore do not need to do anything in the reassemble method.
setState(VoidCallback fn) → void
Equivalent of State.setState for HookState.
shouldRebuild() bool
Called before a build triggered by markMayNeedRebuild.
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
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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