ResStream<S, F>.succeed constructor

ResStream<S, F>.succeed(
  1. S value
)

Creates a result stream that emits one success with the given value, then closes. For stubbing in tests:

when(() => weatherApi.watchTemperature(any()))
    .thenReturn(ResultStream.succeed(21.5));

Implementation

ResStream.succeed(S value) : this._(t.ResultStream.succeed(value));