singleOrNull property
T?
get
singleOrNull
The only element if length == 1, otherwise null.
Implementation
T? get singleOrNull => length == 1 ? single : null;
The only element if length == 1, otherwise null.
T? get singleOrNull => length == 1 ? single : null;