reverse<E> function Null safety

void reverse<E>(
  1. List<E> elements,
  2. [int start = 0,
  3. int? end]
)

Reverses a list, or a part of a list, in-place.

Implementation

void reverse<E>(List<E> elements, [int start = 0, int? end]) {
  end = RangeError.checkValidRange(start, end, elements.length);
  _reverse<E>(elements, start, end);
}