Order<E, T extends Comparable<Object>> class

A namespace for functions that order an Iterable's elements.

To access Order, call the OrderableIterable.order extension method on an iterable.

See AggregateComparableIterable for ordering elements that are Comparable.

Example

final iterable = [('b', 1), ('a', 2), ('c', 3)];
final ordered = foo.order(where: (e) => e.$1).toList();

print(ordered); // [('a', 2), ('b', 1), ('c', 3)]

Properties

ascending List<E>
A list sorted in ascending order of values returned by this Order's function.
no setter
descending List<E>
A list sorted in descending order of values returned by this Order's function.
no setter
hashCode int
The hash code for this object.
no setterinherited
max → E?
The element with the maximum value returned by this Order's function, or null if empty.
no setter
min → E?
The element with the minimum value returned by this Order's function, or null if empty.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited