@@ -576,17 +576,21 @@ class _RenderSliverStickyHeaderList extends RenderSliver with RenderSliverHelper
576
576
// and even if the whole child sliver is smaller than the header.
577
577
578
578
final paintedHeaderSize = calculatePaintOffset (constraints, from: 0 , to: headerExtent);
579
- final cacheExtent = calculateCacheOffset (constraints, from: 0 , to: headerExtent);
580
-
581
579
geometry = SliverGeometry ( // TODO review interaction with other slivers
582
580
scrollExtent: geometry.scrollExtent,
583
581
layoutExtent: geometry.layoutExtent,
584
582
paintExtent: math.max (geometry.paintExtent, paintedHeaderSize),
585
- cacheExtent: math.max (geometry.cacheExtent, cacheExtent),
586
583
maxPaintExtent: math.max (geometry.maxPaintExtent, headerExtent),
587
584
hitTestExtent: math.max (geometry.hitTestExtent, paintedHeaderSize),
588
585
hasVisualOverflow: geometry.hasVisualOverflow
589
586
|| headerExtent > constraints.remainingPaintExtent,
587
+
588
+ // The cache extent is an extension of layout, not paint; it controls
589
+ // where the next sliver should start laying out content. (See
590
+ // [SliverConstraints.remainingCacheExtent].) The header isn't meant
591
+ // to affect where the next sliver gets laid out, so it shouldn't
592
+ // affect the cache extent.
593
+ cacheExtent: geometry.cacheExtent,
590
594
);
591
595
592
596
headerOffset = _headerAtCoordinateEnd ()
0 commit comments