removeAt method

  1. @override
T removeAt(
  1. int index
)
override

Removes the object at position index from this slice. This method reduces the length of this slice and the underlying list by one and moves all later objects down by one position. Returns the removed value. The index must be in the range 0 ≤ index < length. The underlying list must be growable. Note, the ranges of other slices on the underlying list will not change, therefore use with care as this may shift the underlying data in other slices.

Implementation

@override
T removeAt(int index) {
  index = _validateAndNormalize(index);
  final element = _list.removeAt(index);
  _end--;
  return element;
}