I have made this stream that fetch 10 user from firebase. and using streamBuilder it shows user in a Listview(Flutter App). but how to use pagination in such case to get 10 more users after user scroll half of the screen.
this is my stream.which returns a list of UserDetails.
final _refrence = Firestore.instance;
Stream<List<UserDetails>> userStream() {
return _refrence.collection('users').limit(10).snapshots().map((event) =>
event.docs.map((e) => UserDetails.fromJson(e.data())).toList());
}