सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
Flinq डार्ट के संग्रह प्रबंधन को एक सेट ऑफ सहज एक्सटेंशन मेथड्स के साथ बढ़ाता है जो बॉयलरप्लेट कोड को कम करता है। यह आम ऑपरेशन जैसे फ़िल्टरिंग, मैपिंग, और संग्रह के रूपांतरण के लिए सुविधाजनक शॉर्टकट प्रदान करता है, जिससे सूचियों और सेट्स के साथ काम करना अधिक संक्षिप्त और पठनीय हो जाता है। हल्के उपयोगिता के रूप में डिज़ाइन किया गया, Flinq मौजूदा डार्ट प्रोजेक्ट्स में बिना जटिलता के बिना एकीकृत होता है। इसका ध्यान दोहराए गए संग्रह प्रबंधन को सरल बनाकर विकासकर्मी की उत्पादकता में सुधार करने पर है।
उपयोग
सरलीकृत सूची परिवर्तन
डेटा प्रोसेसिंग में बॉइलरप्लेट कम करना
फ़िल्टरिंग और मैपिंग तर्क को सरल बनाना
कोड पढ़ने में आसानी बढ़ाना
कार्यात्मक शैली के संग्रह संचालन में सुधार
प्रोटोटाइपिंग को त्वरित करना
मुख्य विशेषताएँ
चेनेबल एक्सटेंशन मेथड्स
न्यूनतम सिंटैक्स ओवरहेड
सभी मुख्य संग्रह प्रकारों का समर्थन करता है
कोई बाहरी निर्भरता नहीं
स्पष्ट और कार्यात्मक API डिज़ाइन
स्पष्ट विधि नामकरण
इनके लिए उपयुक्त
साफ सुथरा संग्रह कोड चाहने वाले Dart विकासकर्ता
कोड स्पष्टता पर बल देने वाले प्रोजेक्ट
डार्ट में फंक्शनल प्रोग्रामिंग पैटर्न
त्वरित एप्लिकेशन विकास
पुनरावृत्ति कोड कम करने की कोशिश कर रही टीमें
विचार योग्य बातें
संग्रह प्रबंधन तक सीमित
जटिल राज्य प्रबंधन के लिए उपयुक्त नहीं
Dart एक्सटेंशन के साथ परिचित होना आवश्यक है
शुरुआती लोगों के लिए सीखने के लिए वक्र में वृद्धि हो सकती है
अन्य उपकरणों के साथ उपयोग करने में सबसे अच्छा
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
flinq
Extended capabilities for collections.
It's a bunch of shortcuts to avoid unnecesary boilerplate work with collections.
Getting Started
This package will help you to reduce the amount of boilerplate code by adding folowing extensions for Iterables:
getter firstOrNull and method firstOrNullWhere for getting first value, and if it will not be found returns null
getter lastOrNull and method lastOrNullWhere for getting last value, and if it will not be found returns null
getter singleOrNull and method singleOrNullWhere for getting single value, and if it will not be found returns null, and if there will be too many elements it'll also return null
method mapList, which maps collection and casts it to List
method whereList, which filters collection and casts it to List
method mapWhereList, which maps collection, then filters it and then casts it to List
method whereMapList, which filters collection, then maps collection and then casts it to List
getter notNull for getting only not null values from the collection
method group and groupMap for grouping a collection
getter min/minOrNull and max/maxOrNull for getting minimal or maximal value from collection of Comparables
method minWhere/minOrNullWhere and maxWhere/maxOrNullWhere for getting minimal or maximal value from filtered collection of Comparables
getter sum and average for getting sum and average from collection of nums
method sumWhere and averageWhere for getting sum and average from filtered collection of nums
getter distinct and method distinctWhere which will return List with unique values in collection
method union and unionWhere which will return List with union of two collections with only unique values in resulting collection
method intersection and intersectionWhere which will return List with elements that contains both collections with only unique values in resulting collection
method difference and differenceWhere which will return List with difference between two collections with only unique values in resulting collection