StickyListItem<I>.overlay constructor

StickyListItem<I>.overlay({
  1. required Widget header,
  2. required Widget content,
  3. required I itemIndex,
  4. MinOffsetProvider<I>? minOffsetProvider,
  5. StreamSink<StickyState<I>>? streamSink,
  6. HeaderMainAxisAlignment mainAxisAlignment = HeaderMainAxisAlignment.start,
  7. HeaderCrossAxisAlignment crossAxisAlignment = HeaderCrossAxisAlignment.start,
  8. Clip clipBehavior = Clip.hardEdge,
  9. Key? key,
})

Default sticky item constructor with overlayed header positioning.

Header position axis in this case will be against main axis always.

Implementation

StickyListItem.overlay({
  required Widget header,
  required Widget content,
  required this.itemIndex,
  this.minOffsetProvider,
  this.streamSink,
  this.mainAxisAlignment = HeaderMainAxisAlignment.start,
  this.crossAxisAlignment = HeaderCrossAxisAlignment.start,
  Clip clipBehavior: Clip.hardEdge,
  Key? key,
})  : overlayContent = true,
      positionAxis = HeaderPositionAxis.mainAxis,
      super(
        key: key,
        children: [content, header],
        clipBehavior: clipBehavior,
      );