ListBasics<E> extension
Utility extension methods for the native List class.
- on
-
- List<
E>
- List<
Methods
-
slice(
{int? start, int? end, int step = 1}) → List< E> -
Available on List<
Returns a new list containing the elements ofE> , provided by the ListBasics extensionthis
fromstart
inclusive toend
exclusive, skipping bystep
. -
sortBy(
Comparable sortKey(E)) → void -
Available on List<
Sorts this list by the value returned byE> , provided by the ListBasics extensionsortKey
for each element. -
sortedCopy(
) → List< E> -
Available on List<
Returns a sorted copy of this list.E> , provided by the ListBasics extension -
sortedCopyBy(
Comparable sortKey(E)) → List< E> -
Available on List<
Returns a copy of this list sorted by the value returned byE> , provided by the ListBasics extensionsortKey
for each element. -
takeRandom(
{int? seed}) → E? -
Available on List<
Removes a random element ofE> , provided by the ListBasics extensionthis
and returns it.