admin管理员组

文章数量:1291175

I want to define a custom attribute and assign different values to it based on the current theme.

For example, let's say I want to define an attribute called myAttr, Can i do something like this?

private val LightColorScheme = lightColorScheme(
    //...
    myAttr = Color(0xFF6650a4),
)

private val DarkColorScheme = darkColorScheme(
    //...
    myAttr = Color(0xFF459867)
)

Is it possible to achieve this in jetpack compose?

How should I handle this use case properly?

本文标签: