isHeader method

AutoLayout isHeader({
  1. bool pinned = false,
  2. bool floating = false,
  3. required double height,
  4. double? expandedHeight,
})

Implementation

AutoLayout isHeader({bool pinned = false, bool floating = false, required double height, double? expandedHeight}) {
  return this
    .._wrappers.add((widget) {
      final delegate = (expandedHeight != null && expandedHeight != height)
          ? ResizingPinnedHeader(
              expandedHeight: expandedHeight,
              minExtent: height,
              builder: (double height, double ratio, Widget? child) => widget,
              child: widget)
          : FixedPinnedHeader(child: widget, fixedHeight: height);
      return SliverPersistentHeader(
        delegate: delegate,
        pinned: pinned,
        floating: floating,
      );
    });
}