'Gridview.build for Firestore pagination get Rebuilded Every time the list of items change
i'm using Gridview.build for Firestore pagination , when the user scroll down to the last of the gridview , i get more data to the List of items , and notifyListeners() ( i'm using provider) the problem here that when the ListOfItems.lenght changes , all the items of the Gridview.builder rebuilded ,
here is the code
GridView.builder(
itemCount: Provider.of<Myprovider>(context).ProductList.length,
itemBuilder: (context,index){
QueryDocumentSnapshot tmp= Provider.of<Myprovider>(context,listen:
false).ProductList[index];
return ItemProduct(tmp: tmp,index:index);
},
),
Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
