SingleOrNull<T> extension

on
  • Iterable<T>

Methods

singleOrNull([bool test(T)?]) → T?

Available on Iterable<T>, provided by the SingleOrNull extension

Returns the single element of a length = 1 list or null otherwise.