KtMutableListExtensions<T> extension

on

Properties

dart List<T>

Available on KtMutableList<T>, provided by the KtMutableListExtensions extension

Creates a List instance that wraps the original KtList. It acts as a view.
no setter

Methods

fill(T value) → void

Available on KtMutableList<T>, provided by the KtMutableListExtensions extension

Fills the list with the provided value.
removeFirst() → T

Available on KtMutableList<T>, provided by the KtMutableListExtensions extension

Removes the first element from this mutable list.
removeFirstOrNull() → T?

Available on KtMutableList<T>, provided by the KtMutableListExtensions extension

Removes the first element from this mutable list.
removeLast() → T

Available on KtMutableList<T>, provided by the KtMutableListExtensions extension

Removes the last element from this mutable list.
removeLastOrNull() → T?

Available on KtMutableList<T>, provided by the KtMutableListExtensions extension

Removes the last element from this mutable list.
reverse() → void

Available on KtMutableList<T>, provided by the KtMutableListExtensions extension

Reverses elements in the list in-place.
shuffle([Random? random]) → void

Available on KtMutableList<T>, provided by the KtMutableListExtensions extension

Shuffles elements in the list.
sortBy<R extends Comparable>(R selector(T)) → void

Available on KtMutableList<T>, provided by the KtMutableListExtensions extension

Sorts elements in the list in-place according to natural sort order of the value returned by specified selector function.
sortByDescending<R extends Comparable>(R selector(T)) → void

Available on KtMutableList<T>, provided by the KtMutableListExtensions extension

Sorts elements in the list in-place descending according to natural sort order of the value returned by specified selector function.
sortWith(Comparator<T> comparator) → void

Available on KtMutableList<T>, provided by the KtMutableListExtensions extension

Sorts elements in the list in-place according to the specified comparator
swap(int indexA, int indexB) → void

Available on KtMutableList<T>, provided by the KtMutableListExtensions extension

Swaps the elements at the specified positions in the specified list. (If the specified positions are equal, invoking this method leaves the list unchanged.)