commonMain.org.brightify.hyperdrive.util.InternalUtils.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of runtime Show documentation
Show all versions of runtime Show documentation
Hyperdrive implementation that's needed for observations and such
package org.brightify.hyperdrive.util
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlin.reflect.KProperty
internal operator fun StateFlow.getValue(thisRef: OWNER, property: KProperty<*>): T = value
internal operator fun MutableStateFlow.setValue(thisRef: OWNER, property: KProperty<*>, newValue: T) {
value = newValue
}