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