Dart Iterable lastIndexof()

Dart Iterable lastIndexof()

·

1 min read

lastIndexof():

  • The starting position of the last match pattern in this string.

  • The last index of element in this list.

  • Searches the list backwards from index start to 0.

void main() {
  var list = [1, 2, 3, 4, 5, 6, 7, 3, 4, 5];
  print(list.lastIndexOf(2));
}
1

Exited.