Home > database >  Any way to save the State and data of PagedListView?
Any way to save the State and data of PagedListView?

Time:12-22

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.

CodePudding user response:

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,
        ..............
        ...............
      );

CodePudding user response:

I used an IndexedStack instead of a PageView.

  • Related