lastOrNull property
T?
lastOrNull
Returns the last element.
Return null
if the list has no element.
Implementation
T? get lastOrNull {
if (this == null || isEmpty) {
return null;
}
return this?.last;
}