findIndices method

Iterable<int> findIndices(
  1. bool test(
    1. T element
    )
)

return the indices, that satisfy the condition

Implementation

Iterable<int> findIndices(bool Function(T element) test) sync* {
  var index = 0;
  for (var element in this) {
    index++;
    if (test(element)) yield index;
  }
}