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,
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,
this.includeSemantics = true,
String? debugLabel,
}) : _onKeyEvent = onKeyEvent,
_onKey = onKey,
_canRequestFocus = canRequestFocus,
_skipTraversal = skipTraversal,
_descendantsAreFocusable = descendantsAreFocusable,
_descendantsAreTraversable = descendantsAreTraversable,
_debugLabel = debugLabel;