Focus constructor
- Key? key,
- required Widget child,
- FocusNode? focusNode,
- FocusNode? parentNode,
- bool autofocus = false,
- ValueChanged<
bool> ? onFocusChange, - FocusOnKeyEventCallback? onKeyEvent,
- @Deprecated('Use onKeyEvent instead. ' 'This feature was deprecated after v3.18.0-2.0.pre.') FocusOnKeyCallback? onKey,
- bool? canRequestFocus,
- bool? skipTraversal,
- bool? descendantsAreFocusable,
- bool? descendantsAreTraversable,
- bool includeSemantics = true,
- String? debugLabel,
Creates a widget that manages a FocusNode.
Implementation
const Focus({
super.key,
required this.child,
this.focusNode,
this.parentNode,
this.autofocus = false,
this.onFocusChange,
this._onKeyEvent,
@Deprecated(
'Use onKeyEvent instead. '
'This feature was deprecated after v3.18.0-2.0.pre.',
)
this._onKey,
this._canRequestFocus,
this._skipTraversal,
this._descendantsAreFocusable,
this._descendantsAreTraversable,
this.includeSemantics = true,
this._debugLabel,
});