FocusTraversalGroup constructor Null safety

FocusTraversalGroup(
  1. {Key? key,
  2. FocusTraversalPolicy? policy,
  3. bool descendantsAreFocusable = true,
  4. bool descendantsAreTraversable = true,
  5. required Widget child}
)

Creates a FocusTraversalGroup object.

The child and descendantsAreFocusable arguments must not be null.

Implementation

FocusTraversalGroup({
  super.key,
  FocusTraversalPolicy? policy,
  this.descendantsAreFocusable = true,
  this.descendantsAreTraversable = true,
  required this.child,
}) : assert(descendantsAreFocusable != null),
     assert(descendantsAreTraversable != null),
     policy = policy ?? ReadingOrderTraversalPolicy();