findIndex function

int findIndex(
  1. List list,
  2. dynamic element
)

This method uses dart's default List.indexOf Example

_.findIndex(["Jack", "Yash", "Adib", "Alex"], "Adib");
// Returns 2

Implementation

int findIndex(List list, dynamic element) {
  return list.indexOf(element);
}