Skip to content

Generate abstract class which does mutable state binding for Compose UI #2618

@JakeWharton

Description

@JakeWharton

For convenience

abstract class AbstractComposeUiButton : Button<@Composable (Modifier) -> Unit> {
  private var _label: String? by mutableStateOf(null)
  protected val label: String get() = _label as String

  @Override public fun label(label: String) {
    this.label = label
  }
}

Related to #2619

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions