realtime_pagination

Last updated:

0 purchases

realtime_pagination Image
realtime_pagination Images
Add to Cart

Description:

realtime pagination

Realtime Pagination #
A Flutter plugin to help use realtime pagination with Firebase Firestore.
Basic Usage #
@override
Widget build(BuildContext context) {
return RealtimePagination(
query: _firestore.where('coins', greaterThan: 10)
.orderBy("date"), // orderBy is required to pagination work properly
itemsPerPage: 12,
itemBuilder: (index, context, docSnapshot) {
return null; // Build your item here
}
);
}
copied to clipboard
Custom Builder #
@override
Widget build(BuildContext context) {
return RealtimePagination(
query: _firestore.where('coins', greaterThan: 10)
.orderBy("date"), // orderBy is required to pagination work properly
itemsPerPage: 12,
itemBuilder: (index, context, docSnapshot) {
return null; // Build your item here
}

// CUSTOM BUILDER HERE
customPaginatedBuilder: (itemCount, controller, itemBuilder) {
// ASSIGN THESE THREE PROPERTIES, CUSTOMIZE THE REST AS YOU WANT!
return ListView.builder(
controller: controller, // 1
itemCount: itemCount, // 2
itemBuilder: itemBuilder, // 3
);
},
);
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.