FocusableActionDetector constructor Null safety

const FocusableActionDetector(
  1. {Key? key,
  2. bool enabled = true,
  3. FocusNode? focusNode,
  4. bool autofocus = false,
  5. bool descendantsAreFocusable = true,
  6. bool descendantsAreTraversable = true,
  7. Map<ShortcutActivator, Intent>? shortcuts,
  8. Map<Type, Action<Intent>>? actions,
  9. ValueChanged<bool>? onShowFocusHighlight,
  10. ValueChanged<bool>? onShowHoverHighlight,
  11. ValueChanged<bool>? onFocusChange,
  12. MouseCursor mouseCursor = MouseCursor.defer,
  13. required Widget child}
)

Create a const FocusableActionDetector.

The enabled, autofocus, mouseCursor, and child arguments must not be null.

Implementation

const FocusableActionDetector({
  super.key,
  this.enabled = true,
  this.focusNode,
  this.autofocus = false,
  this.descendantsAreFocusable = true,
  this.descendantsAreTraversable = true,
  this.shortcuts,
  this.actions,
  this.onShowFocusHighlight,
  this.onShowHoverHighlight,
  this.onFocusChange,
  this.mouseCursor = MouseCursor.defer,
  required this.child,
})  : assert(enabled != null),
      assert(autofocus != null),
      assert(mouseCursor != null),
      assert(child != null);