containsOnce function

Matcher containsOnce(
  1. Object? expected
)

Matches Iterables where exactly one element matches the expected value, and all other elements don't match.

Implementation

Matcher containsOnce(Object? expected) => _ContainsOnce(expected);