Aus öffentlichen Paketdaten erstellte Orientierung.
firestore_ui ist ein Flutter-Paket, das die Funktionalität von FirebaseAnimatedList in Cloud Firestore bringt und dynamische, animierte Listen aus Firestore-Sammlungen ermöglicht. Es unterstützt Echtzeit-Updates und enthält zusätzliche Varianten für unterschiedliche Anwendungsfälle, wie paginierte oder gefilterte Listen. Speziell für eine nahtlose Integration mit der Cloud-Datenbank von Firebase entwickelt, vereinfacht es die Erstellung reaktiver Benutzeroberflächen, die Live-Datenänderungen über Plattformen hinweg widerspiegeln.
Anwendungsfälle
Echtzeit-Datenanzeige in Listen
Dynamische Inhaltsaktualisierungen aus Firestore
Paginierte oder gefilterte Firestore-Listen
Live-Kollaborations-Apps
Offline-fähige Listenansichten
Hauptmerkmale
Animierte Listenwiedergabe
Unterstützung für Echtzeit-Updates von Firestore
Mehrere Listenvarianten enthalten
Plattformübergreifende Kompatibilität
Einfache API ähnlich wie FirebaseAnimatedList
Geeignet für
Entwickler, die Cloud Firestore verwenden
Apps, die aktuelle Listen erfordern
UI-intensive Firebase-Anwendungen
Flutter-Projekte auf mehreren Plattformen
Hinweise
Firebase und Cloud Firestore Einrichtung erforderlich
Kann die Leistung bei großen Datensätzen beeinträchtigen
Eingeschränkte Anpassungsmöglichkeiten im Vergleich zur rohen ListView
Am besten geeignet für mittelgroße Sammlungen
Abhängig von der Kompatibilität der Firebase SDK-Version
Original-README
Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.
firestore_ui
This project started as a Pull Request to the official cloud_firestore plugin, but unfortunately they are still polishing the main features and this had to be postponed; it's based on firebase_database's version.
But fear not, my fellow Cloud Firestore users, this is a package that extracted the main code from that PR and now it's available to use!
Custom parameters
bool linear - This will make it so it just uses .add instead of .insert, this usually leads to less issues in the order if your list updates linearly (like a chat)
void onLoaded(QuerySnapshot snapshot) - You can use this to access the most recent QuerySnapshot that came from the stream
bool filter(DocumentSnapshot snapshot) - This allows you to filter out specific snapshots on the rendering phase, return true if you want that item to be filtered
bool debug - Set this to see all logs related to inserting/removing/updating items on any variant of the list
How to use
All the examples below are from the actual example folder, please run that to see how it behaves!
List
Just set it up as you would with a ListView.builder:
Just set it up as you would with a GridView.count, alongside the necessary crossAxisCount, all the other parameters from the SliverGridDelegateWithFixedCrossAxisCount are also available:
Special thanks to @letsar for the flutter_staggered_grid_view package! Without it, this part wouldn't be available; please check out the library for more info on how it works!