Member-only story
30 Flutter Tips| FT29: Pagination In Flutter
Flutter Tips 29 of #30FlutterTips With LakshydeepVikram series which had explored about infinite scroll or pagination in Flutter.
You can search for #30FlutterTips for more. If you like this series, please don’t forget to share with #30FlutterTips tag.
FT29: Pagination In Flutter
We will be doing this without the use of any packages.
* Make a list of items
List<int> list = List.generate(20, (index) => index);* Define one scrollController and bool variable
final _controller = ScrollController();
bool _isMoreData = false;
* Display all the list of item using ListViewBuilder or ListView having length more than one (+1) and put the controller inside it which we had defined early
ListView.builder(
itemCount: list.length + 1,
controller: _controller,
itemBuilder: (context, index) {
if (index < list.length) {…










