You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add SliverAppBar test coverage for showOnScreen semantics #189117
I've picked this up, @rkishan516. Summary of the approach and the merge order, since it ended up spanning two repos.
[Outdated - check lastest comment]
Where the tests went. Not packages/flutter/test/material/ — that path fails the required Check Code Freeze job, since Material and Cupertino are frozen here per #184093, and that policy says in-flight Material PRs should be closed and ported to the new packages. So the coverage goes to packages/material_ui/test/app_bar_sliver_test.dart in flutter/packages, which matches what your TODO said. (I initially opened #190410 against the Material test dir before working that out; it's closed in favour of the below.)
One scope note worth your opinion.#186611 removed SliverAppBar from two tests, but only the sliver-list one got a TODO, so this issue mentions only that one. I restored both, because the second case isn't redundant:
expandedHeight
asserts
exercises
...and sliver list
56.0
dy == kExpandedAppBarHeight
pinned bar, never collapses
...and individual slivers
256.0
dy == kToolbarHeight
FlexibleSpaceBar collapse
The second is the one that actually runs the Material collapse path, which the _PinnedHeaderDelegate.collapsing stand-in doesn't reproduce. Restoring only the first would have left that uncovered with nothing tracking it. Happy to split it into its own PR if you'd rather keep this scoped to the issue as filed.
Both assertions were confirmed load-bearing — flipping pinned to false fails each with Expected: <56.0> Actual: <6.0>.
One thing neither PR addresses: the frozen packages/flutter/test/material/app_bar_sliver_test.dart stays without this coverage permanently. showOnScreen depends on core scrolling/semantics code that isn't frozen, so a regression there would break legacy Material SliverAppBar with no presubmit here catching it — flutter/packages CI would surface it against master, but out-of-band. Flagging in case team-design wants that tracked separately; it seems like an accepted consequence of the freeze rather than something in scope here.
Update: the framework-side fix (removing the stale TODO) is in #190410. The actual SliverAppBarshowOnScreen test coverage now lives in flutter/packages#12631, since Material is frozen here and the tests moved to material_ui per #188444.
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.
Activity
Add SliverAppBar showOnScreen semantics test coverage
Vi-debug commentedon Aug 2, 2026
I've picked this up, @rkishan516. Summary of the approach and the merge order, since it ended up spanning two repos.
[Outdated - check lastest comment]
Where the tests went. Not
packages/flutter/test/material/— that path fails the requiredCheck Code Freezejob, since Material and Cupertino are frozen here per #184093, and that policy says in-flight Material PRs should be closed and ported to the new packages. So the coverage goes topackages/material_ui/test/app_bar_sliver_test.dartin flutter/packages, which matches what your TODO said. (I initially opened #190410 against the Material test dir before working that out; it's closed in favour of the below.)Two PRs, in this order:
material_ui. This is the actual fix.scrollable_semantics_test.dart. Currently a draft and should not land until [material_ui] Add SliverAppBar showOnScreen semantics test coverage packages#12341 merges, otherwise the tracking marker disappears while the gap is still open. It carriesFixes #189117, so this issue closes automatically when it lands.One scope note worth your opinion. #186611 removed
SliverAppBarfrom two tests, but only the sliver-list one got a TODO, so this issue mentions only that one. I restored both, because the second case isn't redundant:expandedHeight...and sliver listdy == kExpandedAppBarHeight...and individual sliversdy == kToolbarHeightFlexibleSpaceBarcollapseThe second is the one that actually runs the Material collapse path, which the
_PinnedHeaderDelegate.collapsingstand-in doesn't reproduce. Restoring only the first would have left that uncovered with nothing tracking it. Happy to split it into its own PR if you'd rather keep this scoped to the issue as filed.Both assertions were confirmed load-bearing — flipping
pinnedtofalsefails each withExpected: <56.0> Actual: <6.0>.One thing neither PR addresses: the frozen
packages/flutter/test/material/app_bar_sliver_test.dartstays without this coverage permanently.showOnScreendepends on core scrolling/semantics code that isn't frozen, so a regression there would break legacy MaterialSliverAppBarwith no presubmit here catching it — flutter/packages CI would surface it against master, but out-of-band. Flagging in case team-design wants that tracked separately; it seems like an accepted consequence of the freeze rather than something in scope here.rkishan516 commentedon Aug 3, 2026
Hey @Vi-debug , Your approach looks good.
About second test, yes we have to recover that also in material ui. No need to split.
and yes lets not handle coverage in material ui as part of this.
Vi-debug commentedon Aug 3, 2026
Thank you @rkishan516 , if everything is okay. I think we can merge 2 PR
[material_ui] Add SliverAppBar showOnScreen semantics test coverage
Vi-debug commentedon Aug 26, 2026
Update: the framework-side fix (removing the stale TODO) is in #190410. The actual
SliverAppBarshowOnScreentest coverage now lives in flutter/packages#12631, since Material is frozen here and the tests moved tomaterial_uiper #188444.Add SliverAppBar showOnScreen semantics test coverage
Add SliverAppBar showOnScreen semantics test coverage (flutter#190410)
github-actions commentedon Sep 10, 2026
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 -vand a minimal reproduction of the issue.