CupertinoPickerDefaultSelectionOverlay constructor Null safety

const CupertinoPickerDefaultSelectionOverlay(
  1. {Key? key,
  2. Color background = CupertinoColors.tertiarySystemFill,
  3. bool capStartEdge = true,
  4. bool capEndEdge = true}
)

Creates an iOS 14 style selection overlay that highlights the magnified area (or the currently selected item, depending on how you described it elsewhere) of a CupertinoPicker.

The background argument default value is CupertinoColors.tertiarySystemFill. It must be non-null.

The capStartEdge and capEndEdge arguments decide whether to add a default margin and use rounded corners on the left and right side of the rectangular overlay. Default to true and must not be null.

Implementation

const CupertinoPickerDefaultSelectionOverlay({
  super.key,
  this.background = CupertinoColors.tertiarySystemFill,
  this.capStartEdge = true,
  this.capEndEdge = true,
}) : assert(background != null),
     assert(capStartEdge != null),
     assert(capEndEdge != null);