asBindingProperty

Author

skydoves (Jaewoong Eum)

A SavedStateHandle property for notifying a specific has changed that matches in PropertyChangeRegistry. We can set and get value that matches with key from the SavedStateHandle. Android associate the given value with the key. The value must have a type that could be stored in android.os.Build. The getter for the property that changes should be marked with androidx.databinding.Bindable.

Return

A delegation property SavedStateHandleBindingProperty.

Parameters

key

A key for finding saved value.

fun <T> Flow<T>.asBindingProperty(defaultValue: T): FlowBindingPropertyIdWithDefaultValue<T>

Author

skydoves (Jaewoong Eum)

A Flow property for notifying a specific has changed that matches in PropertyChangeRegistry. This property only collect the flow data on the androidx.lifecycle.viewModelScope and notify them. So this property is read-only, we can't set a value directly.

The getter for the property that changes should be marked with androidx.databinding.Bindable.

Return

A flow delegation property FlowBindingPropertyIdWithDefaultValue.

Parameters

defaultValue

A default value for initializing the property value before flow emitting.

fun <T> Flow<T>.asBindingProperty(coroutineScope: CoroutineScope, defaultValue: T): FlowBindingPropertyIdWithDefaultValueOnScope<T>

Author

skydoves (Jaewoong Eum)

A Flow property for notifying a specific has changed that matches in PropertyChangeRegistry. This property only collect the flow data on the androidx.lifecycle.viewModelScope and notify them. So this property is read-only, we can't set a value directly.

The getter for the property that changes should be marked with androidx.databinding.Bindable.

Return

A flow delegation property FlowBindingPropertyIdWithDefaultValue.

Parameters

coroutineScope

A CoroutineScope where the collecting should be lunched.

defaultValue

A default value for initializing the property value before flow emitting.

fun <T> StateFlow<T>.asBindingProperty(): StateFlowBindingPropertyId<T>

Author

skydoves (Jaewoong Eum)

A StateFlow property for notifying a specific has changed that matches in PropertyChangeRegistry. This property only collect the flow data on the androidx.lifecycle.viewModelScope and notify them. So this property is read-only, we can't set a value directly.

The getter for the property that changes should be marked with androidx.databinding.Bindable.

Return

A flow delegation property StateFlowBindingPropertyId.

fun <T> StateFlow<T>.asBindingProperty(coroutineScope: CoroutineScope): StateFlowBindingPropertyIdOnScope<T>

Author

skydoves (Jaewoong Eum)

A StateFlow property for notifying a specific has changed that matches in PropertyChangeRegistry. This property only collect the flow data on the androidx.lifecycle.viewModelScope and notify them. So this property is read-only, we can't set a value directly.

The getter for the property that changes should be marked with androidx.databinding.Bindable.

Return

A flow delegation property StateFlowBindingPropertyId.

Parameters

coroutineScope

A CoroutineScope where the collecting should be lunched.