GFStickyHeader constructor
GFStickyHeader({
- Key? key,
- required Widget stickyContent,
- required Widget content,
- Axis direction = Axis.vertical,
- bool enableHeaderOverlap = false,
- RenderGFStickyHeaderCallback? callback,
- GFPosition stickyContentPosition = GFPosition.start,
GF Sticky Header will the stick header at top when content is being scrolled. Place this widget inside a ListView, GridView, CustomScrollView, SingleChildScrollView or similar.
Implementation
GFStickyHeader(
{Key? key,
required this.stickyContent,
required this.content,
this.direction = Axis.vertical,
this.enableHeaderOverlap = false,
this.callback,
this.stickyContentPosition = GFPosition.start})
: super(
key: key,
children: stickyContentPosition == GFPosition.start &&
direction == Axis.horizontal
? [stickyContent, content]
: stickyContentPosition == GFPosition.start &&
direction == Axis.vertical
? [content, stickyContent]
: [content, stickyContent]);