whereOrNull method
Returns an iterable with elements that match a condition, or null
if none match.
Implementation
Iterable<T>? whereOrNull(ConditionTester<T> test) {
final filtered = where(test);
return filtered.isEmpty ? null : filtered;
}
Returns an iterable with elements that match a condition, or null
if none match.
Iterable<T>? whereOrNull(ConditionTester<T> test) {
final filtered = where(test);
return filtered.isEmpty ? null : filtered;
}