HookState<R, T extends Hook<R>> class Null safety

The logic and internal state for a HookWidget

Mixed in types

Constructors

HookState()

Properties

context BuildContext
Equivalent of State.context for HookState
@protected, read-only
debugHasShortDescription bool
Whether the devtool description should skip debugFillProperties or not.
read-only
debugLabel String?
A label used by the devtool to show the state of a hook
read-only
debugSkipValue bool
A flag to not show debugValue in the devtool, for hooks that returns nothing.
read-only
debugValue Object?
The value shown in the devtool. [...]
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
hook → T
Equivalent of State.widget for HookState
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

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 non-existent 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