SelectionContainer constructor Null safety

const SelectionContainer(
  1. {Key? key,
  2. SelectionRegistrar? registrar,
  3. required SelectionContainerDelegate delegate,
  4. required Widget child}
)

Creates a selection container to collect the Selectables in the subtree.

If registrar is not provided, this selection container gets the SelectionRegistrar from the context instead.

The delegate and child must not be null.

Implementation

const SelectionContainer({
  super.key,
  this.registrar,
  required SelectionContainerDelegate this.delegate,
  required this.child,
}) : assert(delegate != null),
     assert(child != null);