firstWhere method
Iterates through elements and returns the first to satisfy test
.
- If no element satisfies
test
, the result of invoking theorElse
function is returned. - If
orElse
is omitted, it defaults to throwing a StateError.
Implementation
@override
T firstWhere(Predicate<T> test, {T Function()? orElse}) => _s.firstWhere(test, orElse: orElse);