Problem description
Sometimes, the user can request ‘n’ no. of torrents to be displayed in the feed. In this scenario, loading all the list items at once causes the UI to lag.
Solution
We can lazily load the list items in chunks instead of all at once. This is commonly known as pagination. Several optimizations can be made as follows:
- Loading items only when the user clicks to ‘load more’.
- Retrying/refreshing a network request
- Saving the feed items in the local cache first and then displaying them.
- Filtering and sorting list items
Implementation
We can use a paging library to fetch chunks of data, by their page keys. https://pub.dev/packages/infinite_scroll_pagination.
Are you working on this? (Yes/No)
Yes.
This is what the UI would possibly look like ------------------

Problem description
Sometimes, the user can request ‘n’ no. of torrents to be displayed in the feed. In this scenario, loading all the list items at once causes the UI to lag.
Solution
We can lazily load the list items in chunks instead of all at once. This is commonly known as pagination. Several optimizations can be made as follows:
Implementation
We can use a paging library to fetch chunks of data, by their page keys. https://pub.dev/packages/infinite_scroll_pagination.
Are you working on this? (Yes/No)
Yes.
This is what the UI would possibly look like ------------------