Kotlin does something strange with boolean types. If you have a boolean called isCanceled
, the setter will be setCanceled(boolean)
and the getter will be isCanceled()
. Override this naming convention:
var isCanceled = false
@JvmName("setIsCanceled")
get
val onUpdated = {
doSomething()
doSomethingElse()
}
// pass as an argument
showTheNextStep(onUpdated)
// fire method
onUpdated()