FirstWhereOrNullExt<T> extension

Extension providing a firstWhereOrNull function to find the first element satisfying a condition.

This extension adds a method firstWhereOrNull to iterables, allowing you to find the first element that satisfies the provided condition, or null if no such element exists.

on

Methods

firstWhereOrNull(bool test(T element)) → T?
Finds the first element satisfying the provided condition, or null if none is found.