StateFlowDefaultSubject
constructor(defaultValue: R, coroutineScope: CoroutineScope, context: CoroutineContext = coroutineScope.coroutineContext, observedStateFlow: MutableStateFlow<T?>, autoBind: Boolean = true, observation: ObservationDefault<R, T?> = ObservationDefault(
defaultValue,
ObservableOptional.Value(observedStateFlow.value),
))
Parameters
T
the type of value to expect.
R
the type of result to expect. Must be a subclass of T
defaultValue
The default R to return if the value of the MutableStateFlow is null
.
observedStateFlow
The MutableStateFlow to match the state of.
autoBind
If true
this will automatically call bind.
observation
The ObservationDefault to handle value being observed