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