FocusableState<T extends StatefulWidget> mixin

A mixin for State subclasses that need focus management.

Automatically registers and unregisters a FocusNode with the FocusManager, handling ownership of the node (provided vs. internally created).

Superclass constraints

Properties

context BuildContext
The BuildContext for this state object.
no setterinherited
focusNode FocusNode
The FocusNode used by this widget.
no setter
hasFocus bool
Whether this widget currently has focus.
no setter
hashCode int
The hash code for this object.
no setterinherited
mounted bool
Whether this state object is currently in the tree.
no setterinherited
providedFocusNode FocusNode?
Override to provide an external FocusNode, or return null to use an internal one.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
widget → T
The current widget configuration.
no setterinherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this state.
inherited
didUpdateWidget(covariant T oldWidget) → void
Called when the widget configuration changes.
override
dispose() → void
Called when this state object is removed from the tree permanently.
override
initState() → void
Called when this state object is first inserted into the tree.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onFocusChange(bool focused) → void
Called when the focus state changes. Override to respond to focus changes.
onKeyEvent(KeyEvent event) → void
Called when a key event is received while this widget has focus.
setState(void fn()) → void
Notifies the framework that the internal state has changed, triggering a rebuild.
inherited
toString() String
A string representation of this object.
inherited

Operators

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