SelectionGeometry constructor Null safety

const SelectionGeometry(
  1. {SelectionPoint? startSelectionPoint,
  2. SelectionPoint? endSelectionPoint,
  3. required SelectionStatus status,
  4. required bool hasContent}
)

Creates a selection geometry object.

If any of the startSelectionPoint and endSelectionPoint is not null, the status must not be SelectionStatus.none.

Implementation

const SelectionGeometry({
  this.startSelectionPoint,
  this.endSelectionPoint,
  required this.status,
  required this.hasContent,
}) : assert((startSelectionPoint == null && endSelectionPoint == null) || status != SelectionStatus.none);