https://kotlinlang.org logo
#android
Title
# android
s

Slackbot

03/22/2020, 1:35 PM
This message was deleted.
t

tseisel

03/22/2020, 1:38 PM
You can use a lambda expression:
Copy code
val onMenuButtonClicked: () -> Unit = {
    // Do something
}
or eventually an anonymous function:
Copy code
val onMenuButtonClicked = fun() {
    // Do something
}
How about
Copy code
val onMenuButtonClicked: () -> Unit = {}