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
Would like to be able to peek next and previous pages in addition to current #8408
We need to teach RenderSliverFill to deflate the viewport dimension by the "peek" amount when sizing its children and then also factor the "peek" amount into _PagePosition's logic for converting scroll offsets to page numbers.
The subtle issue is make sure they call get the updated peek value if the PageView rebuilds with a different value. We probably need to change shouldUpdatePosition in Scrollable to let the ScrollController recreate the ScrollPosition in more cases. (Needs a bit more study to find the best path.)
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
abarth commentedon Feb 25, 2017
We need to teach RenderSliverFill to deflate the viewport dimension by the "peek" amount when sizing its children and then also factor the "peek" amount into _PagePosition's logic for converting scroll offsets to page numbers.
abarth commentedon Feb 26, 2017
Work in progress: https://github.com/abarth/flutter/tree/page_peek. Still need to work out the PageController aspects.
lukef commentedon Feb 26, 2017
I'll pull down the WIP later tonight and give it a go.
abarth commentedon Feb 27, 2017
It's a little subtle. Basically, all the places in https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/page_view.dart that divide by viewportDimension need to take the peek value into account.
The subtle issue is make sure they call get the updated peek value if the PageView rebuilds with a different value. We probably need to change shouldUpdatePosition in Scrollable to let the ScrollController recreate the ScrollPosition in more cases. (Needs a bit more study to find the best path.)
abarth commentedon Mar 2, 2017
Made some progress. Still not quite right, but getting close.
lukef commentedon Mar 2, 2017
@abarth - Let me know if you need feedback or information!
Add viewportFraction feature to PageView (#8539)
github-actions commentedon Sep 5, 2021
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.