kt-mvvm / com.dukescript.api.kt / Action

Action

class Action

Represents an operation callable from the user interface.

public var message: String? by observable(null) {
        messageChanges++
    }
val showScreenSize: Action by action {
        message = "Screen size is wide"
    }
val selectWord: Action by actionWithData { word: String? ->
        message = "The word ${word} has been selected"
    }