ListUtilities<T> extension
/// Extends List with additional basic methods.
- on
-
- List<
T>
- List<
Methods
-
count(
T object) → int -
Available on List<
Returns the number of instances there are ofT> , provided by the ListUtilities extensionobjectin this list. -
exclude(
Iterable< T> subset) → List<T> -
Available on List<
Returns a new list containing all of the elements in this list that aren't also contained withinT> , provided by the ListUtilities extensionsubset. -
excludeByIndex(
Iterable< int> indexes) → List<T> -
Available on List<
Returns a sublist containing every element in this list, excluding those at the definedT> , provided by the ListUtilities extensionindexes. -
getRandom(
int count, [int? seed]) → List< T> -
Available on List<
Returns a new list containing random elements from this list.T> , provided by the ListUtilities extension -
pluck(
int start, int? end) → List< T> -
Available on List<
Removes and returns a range of elements from this list.T> , provided by the ListUtilities extension -
removeFirst(
) → T -
Available on List<
Removes the first element in this list.T> , provided by the ListUtilities extension -
removeFirstWhere(
ListTester< T> test) → bool -
Available on List<
Removes the first element in this list that satisfiesT> , provided by the ListUtilities extensiontest. -
removeFrom(
int index, int count) → void -
Available on List<
Removes the number of elements defined byT> , provided by the ListUtilities extensioncount, starting fromindex. -
removeFromEnd(
int count) → void -
Available on List<
Removes the number of elements defined byT> , provided by the ListUtilities extensioncountfrom the end of the list. -
removeLastWhere(
ListTester< T> test) → bool -
Available on List<
Removes the last element in this list that satisfiesT> , provided by the ListUtilities extensiontest. -
removeNull(
) → void -
Available on List<
Removes allT> , provided by the ListUtilities extensionnullvalues from this list. -
removeRandom(
[int? seed]) → T -
Available on List<
Removes and returns a random value from this list.T> , provided by the ListUtilities extension -
resizeAndFill(
int resizeBy, T fill) → void -
Available on List<
Resizes the list byT> , provided by the ListUtilities extensionresizeBy, setting the new elements tofillifresizeByis positive, otherwise removing elements ifresizeByis negative. -
resizeAndGenerate(
int resizeBy, ListGenerator< T> generator) → void -
Available on List<
Resizes the list byT> , provided by the ListUtilities extensionresizeBy, setting the new elements with thegeneratorifresizeByis positive, otherwise removing elements ifresizeByis negative. -
transform(
int index, ListTransformer< T> transformer) → void -
Available on List<
Updates the element atT> , provided by the ListUtilities extensionindexto the value returned bytransformer. -
transformAll(
ListTransformer< T> transformer) → void -
Available on List<
Updates every element in the list to the value returned byT> , provided by the ListUtilities extensiontransformer.