FocusScope constructor Null safety
- {Key? key,
- FocusScopeNode? node,
- required Widget child,
- bool autofocus = false,
- ValueChanged<
bool> ? onFocusChange, - bool? canRequestFocus,
- bool? skipTraversal,
- FocusOnKeyEventCallback? onKeyEvent,
- FocusOnKeyCallback? onKey,
- String? debugLabel}
Creates a widget that manages a FocusScopeNode.
The child argument is required and must not be null.
The autofocus argument must not be null.
Implementation
const FocusScope({
super.key,
FocusScopeNode? node,
required super.child,
super.autofocus,
super.onFocusChange,
super.canRequestFocus,
super.skipTraversal,
super.onKeyEvent,
super.onKey,
super.debugLabel,
}) : assert(child != null),
assert(autofocus != null),
super(
focusNode: node,
);