singleOrNullWhere method

T? singleOrNullWhere(
  1. bool test(
    1. T element
    )
)

Returns the single element that satisfies test.

Returns null if there are either no elements or more than one element satisfying test.

Implementation

T? singleOrNullWhere(bool test(T element)) => this.singleWhereOrNull(test);