skip to Main Content

I wanted to ask if it’s possible to save the state and data (which is already loaded) in a PagedListView( from infinite_scroll_pagination), because every time I change the to another View the state and data is lost.
I am using a PageView to navigate between different Views.

I already tried PageStorage but it didn’t work for me.

2

Answers


  1. Chosen as BEST ANSWER

    I used an IndexedStack instead of a PageView.


  2. Try automaticKeepAlives to true to keep the state of your widgets. You can also manage the keep_alive thing inside a single item.

    PagedListView(
            pagingController: _pagingController,
            addAutomaticKeepAlives: true,
            ..............
            ...............
          );
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search