next<V> function

V? next<V>(
  1. List<V> list,
  2. int index
)

Returns an element following the index, if out of bounds returns null.

Implementation

V? next<V>(List<V> list, int index) {
  index++;
  return index >= list.length ? null : list[index];
}