firstMatchOrNull method

T? firstMatchOrNull(
  1. bool matcher(
    1. T model
    )
)

Implementation

T? firstMatchOrNull(bool Function(T model) matcher) {
  for (var model in this) {
    if (matcher(model)) {
      return model;
    }
  }
  return null;
}