lastOrNull method
Implementation
T? lastOrNull([ bool Function(T item)? predicate ]) {
Iterable<T> iter = this;
if (predicate != null) {
iter = this.where(predicate);
}
if (iter.isEmpty) {
return null;
}
return iter.last;
}
T? lastOrNull([ bool Function(T item)? predicate ]) {
Iterable<T> iter = this;
if (predicate != null) {
iter = this.where(predicate);
}
if (iter.isEmpty) {
return null;
}
return iter.last;
}