Focus constructor

const Focus(
  1. {Key key,
  2. @required Widget child,
  3. FocusNode focusNode,
  4. bool autofocus: false,
  5. ValueChanged<bool> onFocusChange,
  6. FocusOnKeyCallback onKey,
  7. String debugLabel,
  8. bool canRequestFocus,
  9. bool skipTraversal,
  10. bool includeSemantics: true}
)

Creates a widget that manages a FocusNode.

The child argument is required and must not be null.

The autofocus argument must not be null.

Implementation

const Focus({
  Key key,
  @required this.child,
  this.focusNode,
  this.autofocus = false,
  this.onFocusChange,
  this.onKey,
  this.debugLabel,
  this.canRequestFocus,
  this.skipTraversal,
  this.includeSemantics = true,
})  : assert(child != null),
      assert(autofocus != null),
      assert(includeSemantics != null),
      super(key: key);