auxiliary 0.0.4
auxiliary: ^0.0.4 copied to clipboard
An auxiliary Dart library: classes, functions, constants, etc.
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
][EquatableList], [EquatableMap
][EquatableMap], and [EquatableSet
][EquatableSet] classes are unmodifiable collections with deep equality. -
The [
LateList
][LateList] class is an unmodifiableDelegatingList
that uses anIterable
as its source but iterates over it only once and only upon the first access to any element. -
The [
SortedMap
][SortedMap] class is aTreeSet
-basedMap
. The ordering of keys is defined by a givencomparator
or by the defaultComparable.compareTo
function. -
The [
IMultimap
][IMultimap] class is anIMap
-based immutable associative container that maps a key to multiple values. -
The [
Array2D
][Array2D] class is a two-dimensional array of objects.
Error handling #
-
The [
gated
][gated], [gatedAsync
][gatedAsync], [later
][later], and [alone
][alone] functions, along with the [globalGateClosed
][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
][RuntimeError] and [RuntimeException
][RuntimeException] classes may be used as bases for custom errors and exceptions. Both classes are derived from the [RuntimeThrowable
][RuntimeThrowable] mixin. -
The [
WrappingError
][WrappingError] and [WrappingException
][WrappingException] classes may be used when a thrownObject
and its correspondingStackTrace
must be handled as a single entity.
Miscellaneous #
-
The [
log
][log] property provides convenient access to the logging functionality for libraries and applications. -
The [
ActorBase
][ActorBase] mixin is a model for a possible lifecycle of anObject
instance. The [Actor
][Actor] and [ActorAsync
][ActorAsync] mixins supplementActorBase
with initialization and deactivation routines for synchronous and asynchronous scenarios. -
The [
StateMachine
][StateMachine] class is aStream
-based Finite State Machine implementation. -
See the package documentation for the full API.