पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv1.32.8

firestore_ui

cloud_firestore के साथ काम करने वाला firebase_database के FirebaseAnimatedList का पोर्ट, अतिरिक्त विकल्पों के साथ

AndroidiOSWebmacOSWindows
30-दिन डाउनलोड
222
लाइक
75
Pub अंक
140

पैकेज इंस्टॉल करें

flutter pub add firestore_ui

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

firestore_ui एक Flutter पैकेज है जो FirebaseAnimatedList के कार्यक्षमता को Cloud Firestore में लाता है, जिससे Firestore संग्रहों से डायनामिक, एनीमेटेड सूची रेंडरिंग संभव होती है। इसमें रियल-टाइम अपडेट्स का समर्थन होता है और विभिन्न उपयोग के लिए अतिरिक्त विकल्प भी शामिल होते हैं, जैसे पृष्ठांकित या फ़िल्टर की गई सूचियाँ। Firebase के क्लाउड डेटाबेस के साथ बिना किसी दिक्कत के एकीकरण के लिए डिज़ाइन किया गया है, जो लाइव डेटा बदलाव को प्रतिबिंबित करने वाले प्रतिक्रियाशील UI बनाने को सरल बनाता है।

उपयोग

  • सूचियों में रियल-टाइम डेटा प्रदर्शन
  • Firestore से डायनामिक कंटेंट अपडेट
  • पेज़ या फ़िल्टर किए गए Firestore सूचियाँ
  • लाइव सहयोगी एप्लिकेशन्स
  • ऑफलाइन-क्षम लिस्ट दृश्य

मुख्य विशेषताएँ

  • एनिमेटेड सूची रेंडरिंग
  • रियल-टाइम फायरस्टोर अपडेट का समर्थन
  • कई सूची प्रकार शामिल हैं
  • प्लेटफॉर्म के अनुकूलता
  • FirebaseAnimatedList के समान सरल API

इनके लिए उपयुक्त

  • Cloud Firestore का उपयोग करने वाले विकासकर्मी
  • लाइव-अपडेटिंग सूचियों की आवश्यकता वाले ऐप्स
  • UI-भारी Firebase एप्लिकेशन्स
  • कई प्लेटफॉर्म पर Flutter प्रोजेक्ट्स

विचार योग्य बातें

  • Firebase और Cloud Firestore सेटअप की आवश्यकता है
  • बड़े डेटासेट के साथ प्रदर्शन पर प्रभाव पड़ सकता है
  • रॉ लिस्टव्यू की तुलना में सीमित कस्टमाइजेशन
  • मध्यम आकार के संग्रह के लिए सबसे उपयुक्त
  • Firebase SDK संगतता संस्करण पर निर्भर करता है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

firestore_ui

pub package

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:

FirestoreAnimatedList(
    query: query,
    itemBuilder: (
        BuildContext context,
        DocumentSnapshot snapshot,
        Animation<double> animation,
        int index,
    ) => FadeTransition(
        opacity: animation,
        child: MessageListTile(
            index: index,
            document: snapshot,
            onTap: _removeMessage,
        ),
    ),
);

Grid

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:

FirestoreAnimatedGrid(
    query: query,
    crossAxisCount: 2,
    mainAxisSpacing: 4.0,
    childAspectRatio: 1.0,
    crossAxisSpacing: 4.0,
    itemBuilder: (
        BuildContext context,
        DocumentSnapshot snapshot,
        Animation<double> animation,
        int index,
    ) => FadeTransition(
        opacity: animation,
        child: MessageGridTile(
            index: index,
            document: snapshot,
            onTap: _removeMessage,
        ),
    ),
);

Staggered

Just set it up as you would with a StaggeredGridView.countBuilder, alongside the necessary crossAxisCount and the staggeredTileBuilder:

FirestoreAnimatedStaggered(
    query: query,
    staggeredTileBuilder: (int index, DocumentSnapshot snapshot) => StaggeredTile.count(2, index.isEven ? 2 : 1),
    crossAxisCount: 4,
    mainAxisSpacing: 4.0,
    crossAxisSpacing: 4.0,
    itemBuilder: (
        BuildContext context,
        DocumentSnapshot snapshot,
        Animation<double> animation,
        int index,
    ) => FadeTransition(
        opacity: animation,
        child: MessageGridTile(
            index: index,
            document: snapshot,
            onTap: _removeMessage,
        ),
    ),
);

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!

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 7 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।