firstOrNull method
Implementation
T? firstOrNull([bool filter(T item)?]) {
Iterable<T> list = this;
if (filter != null) {
list = list.where(filter);
}
return list.isNotEmpty == true ? list.first : null;
}
T? firstOrNull([bool filter(T item)?]) {
Iterable<T> list = this;
if (filter != null) {
list = list.where(filter);
}
return list.isNotEmpty == true ? list.first : null;
}