firstWhereOrAdd method

V firstWhereOrAdd(
  1. bool test(
    1. V element
    ),
  2. OrAdd<V> orAdd
)

Returns the first element that satisfies the test if there isn't one add a new one and return it.

Implementation

V firstWhereOrAdd(bool Function(V element) test, fn.OrAdd<V> orAdd) =>
    fn.firstWhereOrAdd<V>(this, test, orAdd);