SliverStickyHeader constructor

SliverStickyHeader({
  1. Key? key,
  2. Widget? header,
  3. Widget? sliver,
  4. bool overlapsContent = false,
  5. bool sticky = true,
  6. StickyHeaderController? controller,
})

Creates a sliver that displays the header before its sliver, unless overlapsContent it's true. The header stays pinned when it hits the start of the viewport until the sliver scrolls off the viewport.

The overlapsContent and sticky arguments must not be null.

If a StickyHeaderController is not provided, then the value of DefaultStickyHeaderController.of will be used.

Implementation

SliverStickyHeader({
  Key? key,
  this.header,
  this.sliver,
  this.overlapsContent: false,
  this.sticky = true,
  this.controller,
}) : super(key: key);