RawKeyboardListener constructor Null safety
- {Key? key,
- required FocusNode focusNode,
- bool autofocus = false,
- bool includeSemantics = true,
- ValueChanged<
RawKeyEvent> ? onKey, - required Widget child}
Creates a widget that receives raw keyboard events.
For text entry, consider using a EditableText, which integrates with on-screen keyboards and input method editors (IMEs).
The focusNode and child arguments are required and must not be null.
The autofocus argument must not be null.
Implementation
const RawKeyboardListener({
super.key,
required this.focusNode,
this.autofocus = false,
this.includeSemantics = true,
this.onKey,
required this.child,
}) : assert(focusNode != null),
assert(autofocus != null),
assert(includeSemantics != null),
assert(child != null);