core library Core
General purpose utilities for every Dart program.
Annotations
Annotations that express intent, similar to those in package:meta
.
Comparables & Equality
Mixins that simplify implementation of Comparable, utilities for working with Comparable, and determining deep equality of inbuilt collections.
Mixin for implementing Comparable:
Comparable & Comparator utilities:
Deep equality:
Functions & Monads
Type definitions for common functions, and monads.
Function type definitions:
Monads:
Primitives
Utilities for manipulating primitive types, i.e. bool and String.
Miscellaneous
Classes
-
Failure<
S extends Object, F extends Object> - Represents a failure.
- NotTested
- Denotes that the annotated element is not tested.
- Possible
- Denotes that an annotated element may return the given error codes or throw the given exceptions.
-
Result<
S extends Object, F extends Object> - A Result represents the result of an operation. It is a Success or Failure.
-
Success<
S extends Object, F extends Object> - Represents a success.
Mixins
- Disposable
- A Disposable holds resources such as sockets and streams that need to be manually disposed.
-
Orderable<
T extends Orderable< T> > - Simplifies implementation of naturally ordered types.
Extensions
- Bools on bool
- Provides functions for working with booleans.
-
Comparators
on Comparator<
T> - Provides functions for working with Comparators.
-
DeepEqualityIterable
on Iterable<
Object?> - Provides functions for determining the deep equality of Iterables.
-
DeepEqualityMap
on Map<
Object?, Object?> - Provides functions for determining the deep equality of Maps.
-
DeepEqualityMapEntry
on MapEntry<
Object?, Object?> - Provides functions for determining the deep equality of MapEntrys.
- Equality on Never
- Provides functions that determine the deep equality of objects.
-
FutureMaybe
on Future<
T?> -
Provides functions for working with asynchronous
Maybe
s. - HashCodes on Never
- Provides functions that compute the deep hashcodes of objects.
- Maybe on T?
-
A Maybe monad that may or may not contain a
T
. - StringBuffers on StringBuffer
- Provides functions for working with StringBuffers.
- Strings on String
- Provides functions that manipulate Strings.
Constants
- lazy → const _Lazy
- Denotes that the annotated element is lazy.
Functions
-
max<
T> (T a, T b, {Select< T, Comparable< ? by}) → TObject> > -
Returns the greater of
a
andb
. -
min<
T> (T a, T b, {Select< T, Comparable< ? by}) → TObject> > -
Returns the lesser of
a
andb
.
Typedefs
- Callback = void Function()
- A callback that has no arguments and returns nothing.
-
Consume<
T> = void Function(T value) - An operation that accepts a single argument and returns nothing.
-
Predicate<
T> = bool Function(T value) - A predicate (boolean-valued function) of one argument.
-
Select<
T, R> = R Function(T value) - A selector of one argument.
-
Supply<
T> = T Function() -
A supplier of
T
s.