paginate_firestore
Ein Flutter-Paket zur Vereinfachung der Paginierung mit Firestore-Daten 🗃
- Sterne
- 109
- Forks
- 135
- Letzter Push (UTC)
- 19.08.2024
- Projektstatus
- Aktiv
Original-README
Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.
Pagination in Firestore

Setup
Use the same setup used for cloud_firestore package (or follow this).
Usage
In your pubspec.yaml
dependencies:
paginate_firestore: # latest version
Import it
import 'package:paginate_firestore/paginate_firestore.dart';
Implement it
PaginateFirestore(
//item builder type is compulsory.
itemBuilder: (context, documentSnapshots, index) {
final data = documentSnapshots[index].data() as Map?;
return ListTile(
leading: CircleAvatar(child: Icon(Icons.person)),
title: data == null ? Text('Error in data') : Text(data['name']),
subtitle: Text(documentSnapshots[index].id),
);
},
// orderBy is compulsory to enable pagination
query: FirebaseFirestore.instance.collection('users').orderBy('name'),
//Change types accordingly
itemBuilderType: PaginateBuilderType.listView,
// to fetch real-time data
isLive: true,
),
To use with listeners:
PaginateRefreshedChangeListener refreshChangeListener = PaginateRefreshedChangeListener();
RefreshIndicator(
child: PaginateFirestore(
itemBuilder: (context, documentSnapshots, index) => ListTile(
leading: CircleAvatar(child: Icon(Icons.person)),
title: Text(documentSnapshots[index].data()['name']),
subtitle: Text(documentSnapshots[index].id),
),
// orderBy is compulsary to enable pagination
query: Firestore.instance.collection('users').orderBy('name'),
listeners: [
refreshChangeListener,
],
),
onRefresh: () async {
refreshChangeListener.refreshed = true;
},
)
Contributions
Feel free to contribute to this project.
If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue. If you fixed a bug or implemented a feature, please send a pull request.
Getting Started
This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Contributors ✨
Thanks goes to these wonderful people:
Adam Dupuis 💻 |
Gautham 💻 |
Hafeez Ahmed 💻 |
Claudemir Casa 💻 |
Nikhil27bYt 📖 |
Ferri Sutanto 💻 |
jslattery26 💻 |
garrettApproachableGeek 💻 |
Sua Música 💻 |
Austin Nelson 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Kategorien
Verwendete Abhängigkeiten
Abhängigkeiten 7 Einträge
- flutter
{"sdk":"flutter"} - bloc
^8.0.3 - flutter_bloc
^8.0.1 - cloud_firestore
^3.1.11 - provider
^6.0.2 - flutter_lintsEntwicklung
^1.0.4 - flutter_testEntwicklung
{"sdk":"flutter"}
Wie wähle ich ein passendes Repository?
Nach Anwendungsfall filtern, Aktivität vergleichen und vor der Nutzung das Originalprojekt prüfen.
- Nach Name, Autor oder Beschreibung suchen und nach Thema eingrenzen.
- Sterne, Forks und letzte Pushes vergleichen. Sterne zeigen Interesse, garantieren aber keine Qualität.
- Vor der Nutzung README, Lizenz und Issues auf GitHub prüfen.
Quellen und Pflege
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗
- vedartm/paginate_firestore · GitHub ↗
- GitHub Docs — Saving repositories with stars ↗
- Verzeichnis gepflegt von Ducafecat ↗