An auxiliary Dart library.
It provides an assortment of useful general-purpose classes, functions, constants, etc. Most of these are standalone utilities; some are organized and interconnected.
Overview
Collections
-
The EquatableList, EquatableMap, and EquatableSet classes are unmodifiable collections with deep equality.
-
The LateList class is an unmodifiable
DelegatingList
that uses anIterable
as its source but iterates over it only once and only upon the first access to any element. -
The SortedMap class is a
TreeSet
-basedMap
. The ordering of keys is defined by a givencomparator
or by the defaultComparable.compareTo
function. -
The IMultimap class is an
IMap
-based immutable associative container that maps a key to multiple values. -
The Array2D class is a two-dimensional array of objects.
Error handling
-
The gated, gatedAsync, later, and alone functions, along with the globalGateClosed property, help to prevent critical code sections (for example, data outputting code) from running in the case of a fatal program failure.
-
The RuntimeError and RuntimeException classes may be used as bases for custom errors and exceptions. Both classes are derived from the RuntimeThrowable mixin.
-
The WrappingError and WrappingException classes may be used when a thrown
Object
and its correspondingStackTrace
must be handled as a single entity.
Miscellaneous
-
The log property provides convenient access to the logging functionality for libraries and applications.
-
The ActorBase mixin is a model for a possible lifecycle of an
Object
instance. The Actor and ActorAsync mixins supplementActorBase
with initialization and deactivation routines for synchronous and asynchronous scenarios. -
The StateMachine class is a
Stream
-based Finite State Machine implementation. -
See the package documentation for the full API.
Libraries
- auxiliary
- An auxiliary Dart library.