stl library
Support for doing something awesome.
More dartdocs go here.
Classes
- Any
- A type-safe container for single values of literally any type.
-
Array<
T> - A conceptually strict fixed-size contiguous sequence.
- BitSet
-
A space-efficient set implementation for managing boolean flags.
Mimics C++
std::bitsetfunctionality. -
Box<
T> - A mutable wrapper designed to hold and update values.
-
CartesianRange<
T1, T2> -
A view that generates the Cartesian product of two iterables.
Mimics C++
std::views::cartesian_product. -
ChunkRange<
T> -
A view that splits an iterable into chunks of a specific size.
Mimics C++
std::views::chunk. The last chunk may be smaller than the requested size if the total number of elements is not perfectly divisible by the chunk size. -
Deque<
T> - A double-ended queue (deque) that allows for insertion and deletion of elements at both the front and the rear.
-
DropRange<
T> -
A view that drops the first
countelements of an iterable. Mimics C++std::views::drop. -
FilterRange<
T> -
A view that filters elements based on a predicate.
Mimics C++
std::views::filter. -
ForwardList<
T> - A singly-linked list.
-
HashSet<
T> - An unordered collection that contains no duplicate elements.
-
JoinRange<
T> -
A view that flattens an iterable of iterables into a single contiguous iterable.
Mimics C++
std::views::join. -
None<
T> - Variant representing a missing value.
-
NumberLine<
T extends num> -
A memory-efficient iterable sequence of numbers.
Mimics C++
std::views::iotaor Python'srange(). -
Optional<
T> - A container for a value that may or may not exist. Using a sealed class ensures exhaustive pattern matching.
-
Pair<
T1, T2> - A class that stores a pair of values.
-
PriorityQueue<
T> - An adapter class that provides a Priority Queue (Heap) data structure.
-
Queue<
T> - An adapter class that provides a First-In, First-Out (FIFO) data structure.
-
Ref<
T> - A mutable reference wrapper for binding and managing a value.
-
RepeatRange<
T> -
A view that repeats a single value either limits-free (infinitely) or a specific amount of times.
Mimics C++
std::views::repeat. -
Set<
T> - A collection that contains no duplicate elements.
-
Some<
T> - Variant representing an existing value.
-
SortedSet<
T> - A collection that contains no duplicate elements, ensuring strict sorting order.
-
Stack<
T> - An adapter class that provides a Last-In, First-Out (LIFO) data structure.
-
TakeRange<
T> -
A view that yields up to the first
countelements of an iterable. Mimics C++std::views::take. -
TransformRange<
T, U> -
A view that transforms elements from one type to another using a mapping function.
Mimics C++
std::views::transform. -
Var<
T> - A simple mutable wrapper for holding and updating a value.
-
Variant2<
T0, T1> -
A type-safe discriminated union holding either
T0orT1. -
Variant2Item0<
T0, T1> -
Variant2Item1<
T0, T1> -
Variant3<
T0, T1, T2> -
A type-safe discriminated union holding either
T0,T1, orT2. -
Variant3Item0<
T0, T1, T2> -
Variant3Item1<
T0, T1, T2> -
Variant3Item2<
T0, T1, T2> -
Vector<
T extends Comparable> -
ZipRange<
T1, T2> -
A view that iterates over two iterables in parallel, yielding Pairs.
Mimics C++
std::views::zip. The iteration stops when the shortest iterable is exhausted.
Extension Types
- i16
- A 16-bit signed integer primitive.
- i32
- A 32-bit signed integer primitive.
- i64
- A 64-bit signed integer primitive.
- i8
- An 8-bit signed integer primitive.
- u16
- A 16-bit unsigned integer primitive.
- u32
- A 32-bit unsigned integer primitive.
- u64
- A 64-bit unsigned integer primitive.
- u8
- An 8-bit unsigned integer primitive.
Extensions
-
ComparablePair
on Pair<
T1, T2> -
Adds C++
<utility>relational operators securely without sacrificing generic safety. These operators (<,<=,>,>=,compareTo) automatically unlock when bothT1andT2happen to extendComparable.