GeneralCoralElementsExtension<E> extension

on
  • CoralIterableElements<E>

Methods

anyIndexed(bool test(int index, E element)) → Coral<bool>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns true if any element satisfies an indexed predicate test reactively.
elementAtOrNull(int index) → Coral<E?>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns the indexth element reactively, or null if out of range.
everyIndexed(bool test(int index, E element)) → Coral<bool>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns true if all elements satisfy an indexed predicate test reactively.
expandIndexed<T>(Iterable<T> toElements(int index, E element)) → Coral<List<T>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Flattens this collection along with element indices reactively.
firstWhereIndexedOrNull(bool test(int index, E element)) → Coral<E?>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns the first element that satisfies an indexed predicate test reactively, or null if none.
firstWhereOrNull(bool test(E element)) → Coral<E?>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns the first element that satisfies test reactively, or null if none.
foldIndexed<T>(T initialValue, T combine(int index, T previous, E element)) → Coral<T>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Reduces this collection to a single value by iteratively combining elements along with their index and an initial value reactively.
groupBy<K>(K key(E element)) → Coral<Map<K, List<E>>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Legacy alias of groupListsBy.
groupFoldBy<K, G>({required K key(E element), required G fold(G? previous, E element)}) → Coral<Map<K, G>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Groups and folds elements by a key computed from each element reactively.
groupListsBy<K>(K keyOf(E element)) → Coral<Map<K, List<E>>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Groups elements into lists by keyOf reactively.
groupSetsBy<K>(K keyOf(E element)) → Coral<Map<K, Set<E>>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Groups elements into sets by keyOf reactively.
isSorted(int compare(E a, E b)) → Coral<bool>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns true if this collection is sorted by compare reactively.
isSortedBy<K extends Comparable>(K keyOf(E element)) → Coral<bool>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns true if this collection is sorted by the natural order of keyOf reactively.
isSortedByCompare<K>(K keyOf(E element), int compare(K a, K b)) → Coral<bool>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns true if this collection is sorted by compare of keyOf reactively.
lastBy<K>(K key(E element)) → Coral<Map<K, E>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Groups elements by key reactively, keeping only the last element for each key.
lastWhereIndexedOrNull(bool test(int index, E element)) → Coral<E?>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns the last element that satisfies an indexed predicate test reactively, or null if none.
lastWhereOrNull(bool test(E element)) → Coral<E?>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns the last element that satisfies test reactively, or null if none.
mapIndexed<T>(T convert(int index, E element)) → Coral<List<T>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Maps each element of this collection along with its index reactively.
none(bool test(E element)) → Coral<bool>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns true if no elements satisfy test reactively.
noneIndexed(bool test(int index, E element)) → Coral<bool>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns true if no elements satisfy an indexed predicate test reactively.
reduceIndexed(E combine(int index, E previous, E element)) → Coral<E>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Reduces this collection to a single value by iteratively combining elements along with their index reactively.
sample(int count, [Random? random]) → Coral<List<E>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Selects count elements at random from this collection reactively.
shuffled([Random? random]) → Coral<List<E>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns a list containing the elements of this collection shuffled reactively.
singleWhereIndexedOrNull(bool test(int index, E element)) → Coral<E?>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns the single element that satisfies an indexed predicate test reactively, or null if none.
singleWhereOrNull(bool test(E element)) → Coral<E?>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns the single element that satisfies test reactively, or null if none.
slices(int size) → Coral<List<List<E>>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Splits this collection into chunks of size elements reactively.
sorted(int compare(E a, E b)) → Coral<List<E>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns a list containing the elements of this collection sorted by compare reactively.
sortedBy<K extends Comparable>(K keyOf(E element)) → Coral<List<E>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns a list containing the elements of this collection sorted by keyOf reactively.
sortedByCompare<K>(K keyOf(E element), int compare(K a, K b)) → Coral<List<E>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns a list containing the elements of this collection sorted by compare of keyOf reactively.
splitAfter(bool test(E element)) → Coral<List<List<E>>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Splits this collection into chunks after elements satisfying test reactively.
splitAfterIndexed(bool test(int index, E element)) → Coral<List<List<E>>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Splits this collection into chunks after elements satisfying an indexed predicate test reactively.
splitBefore(bool test(E element)) → Coral<List<List<E>>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Splits this collection into chunks before elements satisfying test reactively.
splitBeforeIndexed(bool test(int index, E element)) → Coral<List<List<E>>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Splits this collection into chunks before elements satisfying an indexed predicate test reactively.
splitBetween(bool test(E first, E second)) → Coral<List<List<E>>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Splits this collection into chunks between elements satisfying test reactively.
splitBetweenIndexed(bool test(int index, E first, E second)) → Coral<List<List<E>>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Splits this collection into chunks between elements satisfying an indexed predicate test reactively.
whereIndexed(bool test(int index, E element)) → Coral<List<E>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Filters elements of this collection based on an indexed predicate test reactively.
whereNot(bool test(E element)) → Coral<List<E>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Returns a list of elements that do not satisfy test reactively.
whereNotIndexed(bool test(int index, E element)) → Coral<List<E>>

Available on CoralIterableElements<E>, provided by the GeneralCoralElementsExtension extension

Filters elements of this collection based on an indexed predicate test reactively, returning those that do not satisfy it.