Home > Blockchain >  Flutter: Implementing search in infinite scroll list issue
Flutter: Implementing search in infinite scroll list issue

Time:08-05

I'm trying to implement searching inside an infinite list pagination whether locally or by query in the API, but there's an issue whenever I use any type of FormField to type, the widget rebuilds and pagingController gets disposed then I get an error.

I'm using a stateful widget and a pagingController for the pagination, and dispose of it in the dispose method.

Is there a solution or has anyone encountered this issue ?

CodePudding user response:

use https://pub.dev/packages/infinite_scroll_pagination

this will make your search and pagination super-easy.

if you want to do it manually

Check flutter official sample which uses provider

https://github.com/flutter/samples/tree/main/infinite_list

  • Related