lastOrNull property
T?
get
lastOrNull
Returns the last element in the iterable, or null if the iterable is empty.
Implementation
T? get lastOrNull => isNotEmpty ? value.last : null;
Returns the last element in the iterable, or null if the iterable is empty.
T? get lastOrNull => isNotEmpty ? value.last : null;