flutter_infinite_listview
flutter_infinite_listview copied to clipboard
How to remove the white space when the list reach out to the last item
Problem: there is a large white space when the listview reaches out to the last item.
Would be great if anyone can help me to remove the white spaces.
Attached a video:
https://user-images.githubusercontent.com/4219513/124019021-6145f680-d99d-11eb-86fd-db8e4deb26d8.mp4
@sopherwang Good evening ! did you manage to fix it?
+1
@slightfoot @bernaferrari @jeroen-meijer
You can fix this by scrollable_positioned_list
import 'package:scrollable_positioned_list/scrollable_positioned_list.dart';
const negativeItemCount = 20;
const itemCount = 40;
return ScrollablePositionedList.builder(
itemCount: itemCount + negativeItemCount,
initialScrollIndex: negativeItemCount,
reverse: true,
itemBuilder: (context, i) {
i -= negativeItemCount;
return ListTile(title: Text(i.toString()));
},
);
It is also possible to create a pseudo infinite scroll by specifying a very large number