File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -562,6 +562,11 @@ class _RenderSliverStickyHeaderList extends RenderSliver with RenderSliverHelper
562562 final headerExtent = header! .size.onAxis (constraints.axis);
563563 final double headerOffset;
564564 if (_headerEndBound == null ) {
565+ // The header's item has [StickyHeaderItem.allowOverflow] true.
566+ // Show the header in full, with one edge at the edge of the viewport,
567+ // even if the (visible part of the) item is smaller than the header,
568+ // and even if the whole child is smaller than the header.
569+
565570 final paintedHeaderSize = calculatePaintOffset (constraints, from: 0 , to: headerExtent);
566571 final cacheExtent = calculateCacheOffset (constraints, from: 0 , to: headerExtent);
567572
@@ -582,6 +587,10 @@ class _RenderSliverStickyHeaderList extends RenderSliver with RenderSliverHelper
582587 ? geometry.layoutExtent - headerExtent
583588 : 0.0 ;
584589 } else {
590+ // The header's item has [StickyHeaderItem.allowOverflow] false.
591+ // Keep the header within the item, pushing the header partly out of
592+ // the viewport if the item's visible part is smaller than the header.
593+
585594 // The limiting edge of the header's item,
586595 // in the outer, non-scrolling coordinates.
587596 final endBoundAbsolute = axisDirectionIsReversed (constraints.growthAxisDirection)
You can’t perform that action at this time.
0 commit comments