lastOrNull property
E?
lastOrNull
Returns the last element, or null
if the collection is empty.
Implementation
E? get lastOrNull => isEmpty ? null : last;
Returns the last element, or null
if the collection is empty.
E? get lastOrNull => isEmpty ? null : last;