singleOrDefault method

Observable<T> singleOrDefault (
  1. {T tooFew,
  2. T tooMany}
)

Emits the single element of this Observable, or emits tooFew if there was no element, or emits tooMany if there was more than 1 element.

Implementation

Observable<T> singleOrDefault({T tooFew, T tooMany}) => singleOrElse(
      tooFew: constantFunction0(tooFew),
      tooMany: constantFunction0(tooMany),
    );