Repository navigation
Commit 308f8fd
authored
Use leading scroll offset instead of infinite offset to reveal pinned slivers (#191329)
Applicable only if the target provided to
`RenderViewportBase.getOffsetToReveal` (and its callers e.g
`Scrollable.ensureVisible`, `scrollUntilVisible` etc.) is a pinned
sliver.
(in say `AxisDirection.down`) If the pinned sliver is below the leading
edge, scroll the viewport by the minimum offset required to pin the
sliver rather than giving it an infinite target offset which just makes
it scroll to the end of the viewport. While the header will always
remain pinned, other slivers below it do not need to scroll.
Fixes [When calling Scrollable.ensureVisible to pinned
SliverPersistentHeader, the view scrolls too
much](#115964)1 parent 717d36b commit 308f8fd
2 files changed
Lines changed: 385 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1192 | 1192 | | |
1193 | 1193 | | |
1194 | 1194 | | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
1195 | 1200 | | |
1196 | 1201 | | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
1200 | 1202 | | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
1201 | 1206 | | |
1202 | 1207 | | |
1203 | | - | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
1204 | 1218 | | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
1210 | | - | |
1211 | | - | |
1212 | 1219 | | |
1213 | 1220 | | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | | - | |
1219 | | - | |
1220 | 1221 | | |
1221 | 1222 | | |
1222 | 1223 | | |
| |||
0 commit comments