singleOrNull property
T?
get
singleOrNull
The only element if length == 1, otherwise null. Audited: 2026-06-12 11:26 EDT
Implementation
T? get singleOrNull => length == 1 ? single : null;
The only element if length == 1, otherwise null. Audited: 2026-06-12 11:26 EDT
T? get singleOrNull => length == 1 ? single : null;