SharedFlowDefaultSubject

constructor(defaultValue: R, initialValue: T? = defaultValue, coroutineScope: CoroutineScope, context: CoroutineContext = coroutineScope.coroutineContext, sharedFlow: MutableSharedFlow<T?>, autoBind: Boolean = true, observation: ObservationDefault<R, T?> = ObservationDefault( defaultValue, ObservableOptional.Value(initialValue), ))

Parameters

T

the type of value to expect.

defaultValue

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

initialValue

The initial value of T

coroutineScope

The CoroutineScope on which to observe the MutableSharedFlow

context

The CoroutineContext in which to observe the MutableSharedFlow

sharedFlow

The MutableSharedFlow to match the state of.

autoBind

If true this will automatically call bind.

observation

The ObservationInitialized to handle value being observed