lastItemOrNull property

T? get lastItemOrNull

Implementation

T? get lastItemOrNull => items.isEmpty ? null : items.last;