Метод indexOf абстрактный
int indexOf(Возвращает первый индекс element в этом списке.
Ищет в списке с индекса start до конца списка. В первый раз, когда встречается объект o, так что o == element, возвращается индекс o.
List<String> notes = ['do', 're', 'mi', 're'];
notes.indexOf('re'); // 1
notes.indexOf('re', 2); // 3
Возвращает -1, если element не найден.
notes.indexOf('fa'); // -1
Исходный код
int indexOf(E element, [int start = 0]);
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-core/List/indexOf.html