lastOrNull property
T?
lastOrNull
Returns the last or null when the collection is empty
Implementation
T? get lastOrNull => isEmpty ? null : last;
Returns the last or null when the collection is empty
T? get lastOrNull => isEmpty ? null : last;