Closed lucasvsme closed 6 years ago
This PR adds a lambda to some widgets to avoid using the apply scope function to setup the instance created. It also has a default value so those who want to use apply anyway can do without problems.
apply
Before
val button = Button(text = "Click").apply { action { println("Hello World") } }
After
val button = Button(text = "Click") { action { println("Hello World") } }
This PR adds a lambda to some widgets to avoid using the
apply
scope function to setup the instance created. It also has a default value so those who want to useapply
anyway can do without problems.Before
After