useFocusNode function

FocusNode useFocusNode({
  1. String? debugLabel,
  2. FocusOnKeyCallback? onKey,
  3. FocusOnKeyEventCallback? onKeyEvent,
  4. bool skipTraversal = false,
  5. bool canRequestFocus = true,
  6. bool descendantsAreFocusable = true,
})

Creates an automatically disposed FocusNode.

See also:

Implementation

FocusNode useFocusNode({
  String? debugLabel,
  FocusOnKeyCallback? onKey,
  FocusOnKeyEventCallback? onKeyEvent,
  bool skipTraversal = false,
  bool canRequestFocus = true,
  bool descendantsAreFocusable = true,
}) {
  return use(
    _FocusNodeHook(
      debugLabel: debugLabel,
      onKey: onKey,
      onKeyEvent: onKeyEvent,
      skipTraversal: skipTraversal,
      canRequestFocus: canRequestFocus,
      descendantsAreFocusable: descendantsAreFocusable,
    ),
  );
}