सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
एक फ्लटर पैकेज जो विकासकर्ताओं को त्वरित रूप से वर्षा प्रवाह लेआउट बनाने में सक्षम बनाता है, जो विभिन्न ऊंचाई वाले कॉलम में वस्तुओं को व्यवस्थित करता है। चित्रों या सामग्री को पिन्टरेस्ट के समान एक डायनामिक, दृश्य रूप से आकर्षक फॉर्मेट में प्रदर्शित करने के लिए उपयुक्त है। यह पैकेज सभी प्रमुख प्लेटफॉर्म जैसे Android, iOS, Web, macOS, Windows और Linux को समर्थन देता है, जिससे क्रॉस-प्लेटफॉर्म स्थिरता सुनिश्चित होती है। यह कॉलम संख्या, अंतराल और स्क्रॉल व्यवहार के लिए कस्टमाइज़ करने योग्य विकल्प प्रदान करता है, जिससे विभिन्न UI आवश्यकताओं के लिए लचीला होता है।
उपयोग
छवि गैलरी प्रदर्शित कर रहे हैं
Pinterest शैली के फीड बनाएं
गतिशील सामग्री ग्रिड निर्माण
उत्पाद सूचियाँ दिखा रहे हैं
प्रतिक्रियाशील लेआउट कार्यान्वयन
मुख्य विशेषताएँ
न्यूनतम कोड के साथ आसान सेटअप
चर आइटम ऊंचाई का समर्थन करता है
कस्टमाइज़ करने योग्य स्तंभ संख्या और अंतराल
क्रॉस-प्लेटफ़ॉर्म संगतता
स्मूथ स्क्रॉलिंग प्रदर्शन
लचीला आइटम बिल्डर
इनके लिए उपयुक्त
सोशल मीडिया फीड बनाने वाले डेवलपर्स
दृश्य सामग्री प्रदर्शन बनाने वाले डिजाइनर
प्रतिक्रियाशील ग्रिड लेआउट की आवश्यकता वाले एप्लिकेशन
गतिशील या अनियमित सामग्री आकार वाले प्रोजेक्ट्स
कई प्लेटफॉर्म का लक्ष्य बनाने वाली टीमें
विचार योग्य बातें
बड़े डेटासेट के लिए अनुकूलन की आवश्यकता हो सकती है
बहुत अधिक आइटम के साथ प्रदर्शन में गिरावट आ सकती है
लेआउट समस्याओं से बचने के लिए आइटम आयामों का ध्यान से निपटान आवश्यक है
स्थिर ऊंचाई के आइटम स्थितियों के लिए उपयुक्त नहीं
मूल ट्रांजिशन के अलावा सीमित बिल्ट-इन एनीमेशन
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
waterfall_flow
A Flutter grid view easy to build waterfall flow layout quickly.
The number of logical pixels between each child along the main axis.
0.0
crossAxisSpacing
The number of logical pixels between each child along the cross axis.
0.0
collectGarbage
Call when collect garbage, return indexs to collect
-
lastChildLayoutTypeBuilder
The builder to get layout type of last child ,Notice: it should only for last child
-
viewportBuilder
The builder to get indexs in viewport
-
closeToTrailing
Whether make layout close to trailing
false
WaterfallFlow.builder(
//cacheExtent: 0.0,
padding: EdgeInsets.all(5.0),
gridDelegate: SliverWaterfallFlowDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
crossAxisSpacing: 5.0,
mainAxisSpacing: 5.0,
/// follow max child trailing layout offset and layout with full cross axis extend/// last child as loadmore item/no more item in [GridView] and [WaterfallFlow]/// with full cross axis extend// LastChildLayoutType.fullCrossAxisExtend,/// as foot at trailing and layout with full cross axis extend/// show no more item at trailing when children are not full of viewport/// if children is full of viewport, it's the same as fullCrossAxisExtend// LastChildLayoutType.foot,
lastChildLayoutTypeBuilder: (index) => index == _list.length
? LastChildLayoutType.foot
: LastChildLayoutType.none,
),
CollectGarbage
track the indexes are collect, you can collect garbage at that monment(for example Image cache)
build lastChild as special child in the case that it is loadmore/no more item.
enumLastChildLayoutType {
/// as default child
none,
/// follow max child trailing layout offset and layout with full cross axis extend/// last child as loadmore item/no more item in [ExtendedGridView] and [WaterfallFlow]/// with full cross axis extend
fullCrossAxisExtend,
/// as foot at trailing and layout with full cross axis extend/// show no more item at trailing when children are not full of viewport/// if children is full of viewport, it's the same as fullCrossAxisExtend
foot,
}
WaterfallFlow.builder(
gridDelegate: SliverWaterfallFlowDelegateWithFixedCrossAxisCount(
lastChildLayoutTypeBuilder: (index) => index == length
? LastChildLayoutType.foot
: LastChildLayoutType.none,
),
CloseToTrailing
when reverse property of List is true, layout is as following.
it likes chat list, and new session will insert to zero index.
but it's not right when items are not full of viewport.
to solve it, you could set closeToTrailing to true, layout is as following.
support [ExtendedGridView],[ExtendedList],[WaterfallFlow].
and it also works when reverse is flase, layout will close to trailing.