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