focusNode method

FocusNode focusNode({
  1. String? debugLabel,
  2. @Deprecated(_focusOnKeyDeprecationMsg) FocusOnKeyCallback? onKey,
  3. FocusOnKeyEventCallback? onKeyEvent,
  4. bool skipTraversal = false,
  5. bool canRequestFocus = true,
  6. bool descendantsAreFocusable = true,
  7. bool descendantsAreTraversable = true,
})

Provides a way to easily get a copy of a FocusNode.

Implementation

FocusNode focusNode({
  String? debugLabel,
  @Deprecated(_focusOnKeyDeprecationMsg) FocusOnKeyCallback? onKey,
  FocusOnKeyEventCallback? onKeyEvent,
  bool skipTraversal = false,
  bool canRequestFocus = true,
  bool descendantsAreFocusable = true,
  bool descendantsAreTraversable = true,
}) {
  return use.disposable(FocusNode.new, (node) => node.dispose())
    ..debugLabel = debugLabel
    // ignore: deprecated_member_use
    ..onKey = onKey
    ..onKeyEvent = onKeyEvent
    ..skipTraversal = skipTraversal
    ..canRequestFocus = canRequestFocus
    ..descendantsAreFocusable = descendantsAreFocusable
    ..descendantsAreTraversable = descendantsAreTraversable;
}