DefaultFlowObservable

constructor(defaultValue: R, initialValue: T? = defaultValue, coroutineScope: CoroutineScope, context: CoroutineContext = coroutineScope.coroutineContext, flow: Flow<T?>, observation: ObservationDefault<R, T?> = ObservationDefault( defaultValue, ObservableOptional.Value(initialValue), ))

Parameters

T

the type of value to expect.

R

the type of result to expect. Must be a subclass of T

defaultValue

The default value of R to observe if the Flow emits null.

initialValue

The initial value of T

coroutineScope

The CoroutineScope on which to observe the Flow

context

The CoroutineContext in which to observe the Flow

flow

The Flow to observe

observation

The ObservationUninitialized to observe the Flow