inline fun <T> observable( initialValue: T, crossinline onChange: (property: KProperty<*>, oldValue: T, newValue: T) -> Unit ): ReadWriteProperty<Any?, T>
Returns a property delegate for a read/write property that calls a specified callback function when changed.
initialValue
- the initial value of the property.
onChange
- the callback which is called after the change of the property is made. The value of the property has already been changed when this callback is invoked.
© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.properties/-delegates/observable.html