ListExtensions<T> extension
- on
-
- List<
T>
- List<
Methods
-
all(
bool test(T element)) → bool -
Available on List<
Checks if all elements satisfy a given conditionT> , provided by the ListExtensions extension -
any(
bool test(T element)) → bool -
Available on List<
Checks if at least one element satisfies a given conditionT> , provided by the ListExtensions extension -
combinations(
int n) → List< List< T> > -
Available on List<
Returns a list of all combinations of size nT> , provided by the ListExtensions extension -
distinct(
) → List< T> -
Available on List<
Returns a list with duplicate elements removedT> , provided by the ListExtensions extension -
firstWhereOrNull(
bool test(T element)) → T? -
Available on List<
Finds the first element that satisfies the given condition, or null if none foundT> , provided by the ListExtensions extension -
groupBy<
K> (K keyExtractor(T element)) → Map< K, List< T> > -
Available on List<
Groups elements by a specific key and returns a map of key to list of elementsT> , provided by the ListExtensions extension -
lastWhereOrNull(
bool test(T element)) → T? -
Available on List<
Finds the last element that satisfies the given condition, or null if none foundT> , provided by the ListExtensions extension -
maxBy<
K extends Comparable> (K keyExtractor(T element)) → T? -
Available on List<
Returns the maximum element based on a specific keyT> , provided by the ListExtensions extension -
minBy<
K extends Comparable> (K keyExtractor(T element)) → T? -
Available on List<
Returns the minimum element based on a specific keyT> , provided by the ListExtensions extension -
reversedCopy(
) → List< T> -
Available on List<
Returns a reversed copy of the listT> , provided by the ListExtensions extension -
sortBy<
K extends Comparable> (K keyExtractor(T element), {bool descending = false}) → void -
Available on List<
Sorts the list by a specific key extracted from each elementT> , provided by the ListExtensions extension -
sortedBy<
K extends Comparable> (K keyExtractor(T element), {bool descending = false}) → List< T> -
Available on List<
Returns a sorted copy of the list by a specific key extracted from each elementT> , provided by the ListExtensions extension