SliverPersistentHeader constructor Null safety

const SliverPersistentHeader(
  1. {Key? key,
  2. required SliverPersistentHeaderDelegate delegate,
  3. bool pinned = false,
  4. bool floating = false}
)

Creates a sliver that varies its size when it is scrolled to the start of a viewport.

The delegate, pinned, and floating arguments must not be null.

Implementation

const SliverPersistentHeader({
  super.key,
  required this.delegate,
  this.pinned = false,
  this.floating = false,
}) : assert(delegate != null),
     assert(pinned != null),
     assert(floating != null);