subList method

ArrayList<E> subList(
  1. int fromIndex,
  2. int toIndex
)

Returns a view of the portion of this list between the specified indices.

fromIndex the starting index (inclusive) toIndex the ending index (exclusive)

Implementation

ArrayList<E> subList(int fromIndex, int toIndex) {
  return ArrayList<E>.from(_list.sublist(fromIndex, toIndex));
}