firstWhereOrNull method

Package? firstWhereOrNull(
  1. bool test(
    1. Package element
    )
)

Implementation

Package? firstWhereOrNull(bool Function(Package element) test) {
  for (final element in this) {
    if (test(element)) return element;
  }
  return null;
}