GFStickyHeader constructor

GFStickyHeader({
  1. Key? key,
  2. required Widget stickyContent,
  3. required Widget content,
  4. Axis direction = Axis.vertical,
  5. bool enableHeaderOverlap = false,
  6. RenderGFStickyHeaderCallback? callback,
  7. 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]);