ws <a href="dart-core/StateError-class.html">StateError</a>.
If no matching element is found, returns the result of <code>orElse</code>.
If <code>orElse</code> is omitted, it defaults to throwing a <a href="dart-core/StateError-class.html">StateError</a>.</p>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">E singleWhere(bool test(E value), {E Function()? orElse}) {
  late E resul