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 @@ -570,6 +570,11 @@ class _RenderSliverStickyHeaderList extends RenderSliver with RenderSliverHelper
570
570
final headerExtent = header! .size.onAxis (constraints.axis);
571
571
final double headerOffset;
572
572
if (_headerEndBound == null ) {
573
+ // The header's item has [StickyHeaderItem.allowOverflow] true.
574
+ // Show the header in full, with one edge at the edge of the viewport,
575
+ // even if the (visible part of the) item is smaller than the header,
576
+ // and even if the whole child sliver is smaller than the header.
577
+
573
578
final paintedHeaderSize = calculatePaintOffset (constraints, from: 0 , to: headerExtent);
574
579
final cacheExtent = calculateCacheOffset (constraints, from: 0 , to: headerExtent);
575
580
@@ -590,6 +595,10 @@ class _RenderSliverStickyHeaderList extends RenderSliver with RenderSliverHelper
590
595
? geometry.layoutExtent - headerExtent
591
596
: 0.0 ;
592
597
} else {
598
+ // The header's item has [StickyHeaderItem.allowOverflow] false.
599
+ // Keep the header within the item, pushing the header partly out of
600
+ // the viewport if the item's visible part is smaller than the header.
601
+
593
602
// The limiting edge of the header's item,
594
603
// in the outer, non-scrolling coordinates.
595
604
final endBoundAbsolute = axisDirectionIsReversed (constraints.growthAxisDirection)
You can’t perform that action at this time.
0 commit comments