Restore pageView state when switching to another app page and back

59 views Asked by At

I'm developing a social app with flutterflow.

Is there a way to keep and restore the pageView state itself and its children when switching to another app page? My use case is a feed page based on pageView that uses infinite scrolling.

The user swiped down 20 times, clicked on "View profile" button and then clicked on "Return" button. He/she expects to be in the same swiping position and see the last post again.

There is no built in way to preserve the list of read posts and the pageView index and infinite scrolling offset.

Any idea how this problem may be solved?

I tried saving the pageView widget index in app state and use Jump-to-page action when user returns. It does not work well with the infinite scrolling. Say the user swiped 20 tomes and the scrolling count is 5, it will not go to the 20th page but to the 8th page.

0

There are 0 answers