StackOverflow 文件 Kotlin 教程 委託屬性 可觀察的屬性 可觀察的屬性 Created: November-22, 2018 var foo : Int by Delegates.observable("1") { property, oldValue, newValue -> println("${property.name} was changed from $oldValue to $newValue") } foo = 2 該示例列印 foo was changed from 1 to 2 定製授權委託屬性