Skip to content

SliverMainAxisGroup + pinned headers overlap (no push-off) in 3.38.x, works in 3.35.x #178973

Closed

Description

@silvershort

Steps to reproduce

Summary

In Flutter 3.38.x, a SliverMainAxisGroup containing nested SliverMainAxisGroups with SliverPersistentHeader(pinned: true) stops pushing the previous header out of view. The new header “dives under” the
previous one instead of replacing it. The same layout works correctly on 3.35.x and earlier.

Environment

  • Flutter: 3.38.3 (stable) — bug reproduces
  • Flutter: 3.35.7 (stable) — works as expected
  • Dart: 3.10.1 (3.38), 3.8.x (3.35)
  • Platform tested: iOS Simulator (iPhone 16 Pro)

Minimal reproduction

DartPad repro: [paste the DartPad link here]

Key structure:

  • CustomScrollView
  • outer SliverMainAxisGroup
    • SliverPersistentHeader(pinned: true) for Year A
    • inner SliverMainAxisGroup
      • SliverPersistentHeader(pinned: true) for Month a1
      • SliverList
      • SliverPersistentHeader(pinned: true) for Month a2
      • SliverList
  • Next year section follows.

Steps to reproduce

  1. Run the DartPad sample on Flutter 3.38.3 (stable).
  2. Scroll so Month A1 content scrolls away and Month A2 header should replace it.
  3. Observe that the incoming header overlaps/slots under the previous header instead of pushing it off.
  4. Repeat on Flutter 3.35.7 — headers push off correctly.

Videos

  • 3.38.3 (bug):
3.38.mov
  • 3.35.7 (correct):
3.35.mov

Additional notes

  • Tried replacing SliverPersistentHeader with PinnedHeaderSliver; the overlap still occurs on 3.38.x.
  • ScrollOffsetCorrection changes and PinnedHeaderSliver fixes in 3.38 were suspected, since the regression is only between 3.35.x → 3.38.x.

Expected results

Expected behavior

When a new pinned header enters, it should push the previous pinned header off-screen (standard sticky behavior).

Actual results

Actual behavior

On 3.38.x, the new header overlaps/overdraws the previous header; it does not push it away.

Code sample

https://dartpad.dev/bc460238c9a5abd2802f9d3a1daaf4fe

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

Activity

  1. tirth-patel-nc commented on Nov 24, 2025

    @tirth-patel-nc
    Member

    Thanks for the report. Seeing the same behaviour with latest SDK versions. Appears to be working as intended on 3.35.7. Marking it as a regression.

    stable : 3.38.3
    master : 3.39.0-1.0.pre-270
    

    Bisected to #173349

  2. added
    c: regressionIt was better in the past than it is now
    p: material_uimaterial_ui package in flutter/packages
    f: scrollingViewports, list views, slivers, etc.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    frameworkflutter/packages/flutter repository. See also f: labels.
    and removed
    in triagePresently being triaged by the triage team
    on Nov 24, 2025
  3. justinmc commented on Nov 25, 2025

    @justinmc
    Contributor

    FYI @yiiim @Piinks it looks like #173349 has caused a regression.

  4. added
    P2Important issues not at the top of the work list
    on Nov 25, 2025
  5. added a commit that references this issue on Dec 10, 2025
    8fe7618
  6. added a commit that references this issue on Dec 11, 2025
    1dfd694
  7. added a commit that references this issue on Dec 19, 2025
    c04c46c
  8. github-actions commented on Dec 25, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  9. locked as resolved and limited conversation to collaborators on Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: regressionIt was better in the past than it is nowf: scrollingViewports, list views, slivers, etc.found in release: 3.38Found to occur in 3.38found in release: 3.39Found to occur in 3.39frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions