SimpleInitializedObservable
A BaseInitializedObservable that has a fixed value.
Parameters
T
the type of value to expect.
value
The fixed value of the observable
Properties
Link copied to clipboard
The current value T or null
being observed
Link copied to clipboard
The initial ObservableOptional value of T.
Link copied to clipboard
A ReadOnlyProperty of T
Functions
Link copied to clipboard
Creates an observation that calls onNext each time a new value is observed until the resulting Disposable is disposed
Link copied to clipboard
Link copied to clipboard
fun <T> WithState<T?>.observeNotNullOnLifecycle(lifecycleOwner: LifecycleOwner, filter: suspend (T) -> Boolean = { true }, onNext: (T) -> Unit): Job
Observes WithState of a nullable value on the lifecycle of a LifecycleOwner
Link copied to clipboard
fun <T> WithState<T>.observeOnLifecycle(lifecycleOwner: LifecycleOwner, filter: suspend (T) -> Boolean = { true }, onNext: (T) -> Unit): Job
Observes WithState on the lifecycle of a LifecycleOwner
fun <T, R> WithState<T>.observeOnLifecycle(lifecycleOwner: LifecycleOwner, filter: suspend (T) -> Boolean = { true }, transform: suspend (T) -> R, onNext: (R) -> Unit): Job
Observes WithState on the lifecycle of a LifecycleOwner by transforming the observed value.
Link copied to clipboard
fun <R : T, T> ReadOnlyProperty<Any?, T?>.toDefaultObservable(defaultValue: R): ReadOnlyPropertyDefaultObservable<R, T?>
Converts a ReadOnlyProperty into a ReadOnlyPropertyDefaultObservable
Link copied to clipboard
fun <T> ReadOnlyProperty<Any?, T>.toInitializedObservable(): ReadOnlyPropertyInitializedObservable<T>
Converts a ReadOnlyProperty into a ReadOnlyPropertyInitializedObservable