Skip to content

Enable Dynamic Parameters #81

@agrosner

Description

@agrosner

I want to base a parameter off a specific condition in compose, such as if its dark theme or light theme.

val uiTheme by parameter(
        if (isDarkTheme()) {
            listOf("foo")
        } else {
            listOf(
                "barA",
                "barB",
                "barN"
            )
        },
    )

results in only the first parameter list being used.

Ideally the parameter list would try to map the current value to the new value list. if its not matching, then default back to the first selection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions