indexOf method

int indexOf(
  1. E element, [
  2. int start = 0
])

Search for element starting from start and return its index.

If the element does not exist, -1 is returned.

Implementation

int indexOf(E element, [int start = 0]) =>
    indexWhere((value) => element == value, start);