क्वाइवर डार्ट के उपयोगी पुस्तकालयों का सेट है जो बहुत सारे डार्ट पुस्तकालयों के उपयोग को आसान और अधिक सुविधाजनक बनाता है, या अतिरिक्त कार्यक्षमता जोड़ता है।
सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
Quiver एक उपयोगिता पुस्तकालय का संग्रह है जो डार्ट के मूल लाइब्रेरी में सुविधाजनक विस्तार और अतिरिक्त कार्यक्षमता प्रदान करके डेवलपर उत्पादकता को बढ़ाता है। यह संग्रहण प्रबंधन, हैशिंग, समानता जाँच और कार्यात्मक प्रोग्रामिंग पैटर्न जैसे सामान्य कार्यों को सरल बनाता है। हल्के और मॉड्यूलर डिज़ाइन के साथ, Quiver Android, iOS, Web, macOS, Windows और Linux सहित कई प्लेटफॉर्मों का समर्थन करता है। पैकेज Google द्वारा बनाए गए हैं और pub के माध्यम से Flutter परियोजनाओं में बिना किसी दिक्कत के एकीकृत होता है। यह दोहराए जा सकने वाले, अच्छी तरह से परीक्षण किए गए उपयोगिताओं के साथ कोड को सरल बनाने की खोज करने वाले डेवलपर्स के लिए आदर्श है।
उपयोग
संग्रह संचालन को सरल बनाना
कस्टम समानता और हैशिंग कार्यान्वयन
कार्यात्मक प्रोग्रामिंग में सुधार
अपरिवर्तनीय डेटा संरचनाओं का प्रबंधन
संक्षिप्त, पठनीय डार्ट कोड लेखन
उपयोगिता फ़ंक्शन के साथ परीक्षण क्षमता में सुधार
मुख्य विशेषताएँ
मॉड्यूलर उपयोगिता पैकेज
विस्तृत संग्रह सहायक उपकरण
हैश और समानता उपकरण
फंक्शनल प्रोग्रामिंग टूल्स
क्रॉस-प्लेटफॉर्म संगतता
अच्छी तरह से संदर्भित और परीक्षण किया गया
इनके लिए उपयुक्त
कोड सरलता की तलाश में डार्ट विकासकर्ता
मजबूत उपयोगिता कार्यों की आवश्यकता वाले प्रोजेक्ट
निरंतर कोड अभ्यास के लिए लक्ष्य निर्धारित करने वाली टीमें
बढ़ी हुई डेटा हैंडलिंग की आवश्यकता वाले Flutter ऐप्स
अपरिवर्तनीय या जटिल डेटा प्रकारों के साथ काम करने वाले विकासकर्मी
विचार योग्य बातें
एक पूर्ण फ्रेमवर्क नहीं—केवल उपयोगिताएँ जोड़ता है
कुछ पैकेजों के अलग से आयात की आवश्यकता हो सकती है
उपयोगिता सुधारों तक सीमित, UI घटकों के लिए नहीं
अगर अधिक उपयोग किया जाए, तो निर्भरता सतह बढ़ सकती है
प्रोजेक्ट की आवश्यकताओं के आधार पर चयनात्मक रूप से सबसे अच्छा उपयोग किया जाना चाहिए
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
A set of utility libraries for Dart that makes using many Dart libraries easier
and more convenient, or adds additional functionality.
Utilities for working with Futures, Streams and async computations.
collect collects the completion events of an Iterable of Futures into a
Stream.
enumerate and concat represent Stream versions of the same-named
quiver.iterables methods.
StreamBuffer allows for the orderly reading of elements from a stream, such as
a socket.
FutureStream turns a Future<Stream> into a Stream which emits the same
events as the stream returned from the future.
StreamRouter splits a Stream into multiple streams based on a set of
predicates.
CountdownTimer is a simple countdown timer that fires events in regular
increments.
Metronome is a self-correcting alternative to Timer.periodic. It provides a
simple, tracking periodic stream of DateTime events with optional anchor time.
stringFromByteStream constructs a string from a stream of byte lists.
Cache is a semi-persistent, asynchronously accessed, mapping of keys to
values. Caches are similar to Maps, except that the cache implementation might
store values in a remote system, so all operations are asynchronous, and caches
might have eviction policies.
MapCache is a Cache implementation backed by a Map.
concat, count, cycle, enumerate, merge, partition, range, and
zip create, transform, or combine Iterables in different ways, similar to
Python's itertools.
min, max, and extent retrieve the minimum and maximum elements from an
iterable.
GeneratingIterable is an easy way to create lazy iterables that produce
elements by calling a function. A common use-case is to traverse properties in
an object graph, like the parent relationship in a tree.
InfiniteIterable is a base class for Iterables that throws on operations that
require a finite length.
isBlank checks if a string is null, empty or made of whitespace characters.
isNotBlank checks if a string is not null, and not blank.
isEmpty checks if a string is null or empty.
isNotEmpty checks if a string is not null and not empty.
equalsIgnoreCase checks if two strings are equal, ignoring case.
compareIgnoreCase compares two strings, ignoring case.
loop allows you to loop through characters in a string starting and ending at
arbitrary indices. Out of bounds indices allow you to wrap around the string,
supporting a number of use-cases, including:
Rotating: loop('lohel', -3, 2) => 'hello'
Repeating, like String's operator*, but with better character-level
control, e.g.: loop('la ', 0, 8) => 'la la la' // no trailing space
Clock provides points in time relative to the current point in time, for
example: now, 2 days ago, 4 weeks from now, etc. For testability, use Clock
rather than other ways of accessing time, like new DateTime(), so that you can
use a fake time function in your tests to control time.
Now is a typedef for functions that return the current time in microseconds,
since Clock deals in DateTime which only have millisecond accuracy.
aMicrosecond, aMillisecond, aSecond, aMinute, anHour, aDay, and
aWeek are unit duration constants to allow writing for example:
aDay vs. const Duration(days: 1)
aSecond * 30 vs. const Duration(seconds: 30)
Testing Libraries
The Quiver testing libraries are intended to be used in testing code, not
production code. It currently consists of fake implementations of some Quiver
interfaces.
FakeAsync enables testing of units which depend upon timers and microtasks. It
supports fake advancements of time and the microtask queue, which cause fake
timers and microtasks to be processed. A Clock is provided from which to read
the current fake time. Faking synchronous or blocking time advancement is also
supported.