Kotlin Delegated properties Observable properties


Example

var foo : Int by Delegates.observable("1") { property, oldValue, newValue ->
    println("${property.name} was changed from $oldValue to $newValue")
}
foo = 2

The example prints foo was changed from 1 to 2