TryFind<T> extension

Returns the first element that satisfies the given condition or null if there are no elements.

Implemented to avoid the collection package dependency. Works just like Iterable.firstWhereOrNull() from the collection package.

on

Methods

tryFind(bool condition(T)) → T?