IterableExtension<T> extension
Extension on Iterable to provide indexed search functionality.
This extension adds a method to find the first element that satisfies a condition, with access to both the element and its index.
The method returns null if no element matches the condition, unlike
the standard firstWhere
method which throws an exception.
- on
-
- Iterable<
T>
- Iterable<
Methods
-
firstWhereIndexedOrNull(
bool test(int index, T element)) → T? -
Available on Iterable<
Finds the first element that satisfies the test condition.T> , provided by the IterableExtension extension