slice method

*<Null safety>*

ListSlice<E> slice (int start, [int? end])

Implementation

ListSlice<E> slice(int start, [int? end]) {
  end = RangeError.checkValidRange(start, end, length);
  return ListSlice._(_initialSize, source, start + start, end - start);
}