toDefaultObservable
fun <R : T, T> Flow<T?>.toDefaultObservable(defaultValue: R, initialValue: T? = defaultValue, coroutineScope: CoroutineScope, context: CoroutineContext = coroutineScope.coroutineContext): DefaultFlowObservable<R, T>
Converts a Flow into a DefaultFlowObservable
Parameters
defaultValue
The default value to observe if the Flow emits null.
initialValue
The initial value to observe until the Flow emits.
coroutineScope
The CoroutineScope on which to observe the Flow
context
The CoroutineContext in which to observe the Flow
fun <R : T, T> ReadOnlyProperty<Any?, T?>.toDefaultObservable(defaultValue: R): ReadOnlyPropertyDefaultObservable<R, T?>
Converts a ReadOnlyProperty into a ReadOnlyPropertyDefaultObservable
Parameters
defaultValue
The default value of R to observe if the ReadOnlyProperty has a value of null.