realtime_pagination 0.0.7 copy "realtime_pagination: ^0.0.7" to clipboard
realtime_pagination: ^0.0.7 copied to clipboard

outdated

A Flutter package that helps use realtime pagination with Firestore

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
     }
  );
}

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
       );
     },
  );
}
15
likes
40
pub points
0%
popularity

Publisher

unverified uploader

A Flutter package that helps use realtime pagination with Firestore

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

bloc, cloud_firestore, flutter

More

Packages that depend on realtime_pagination