lastOrNull property
T?
get
lastOrNull
Returns the last item in the list, or null if empty.
Implementation
T? get lastOrNull => value.isEmpty ? null : value.last;
Returns the last item in the list, or null if empty.
T? get lastOrNull => value.isEmpty ? null : value.last;