reverse<T> function
- List<
T> list
Reverses the order of the elements in the list in-place.
Example:
final list = [1, 2, 3];
reverse(list); // list is now [3, 2, 1]
Implementation
void reverse<T>(List<T> list) {
_reverseRange(list, 0, list.length);
}