https://kotlinlang.org logo
#compose
Title
# compose
o

oday

07/13/2022, 11:54 AM
I would like to have a function that accepts an enum of Colors, I want the enum to look like this
Copy code
enum class StylisedIconColor(val color: Color) {
    BRAND(MaterialTheme.colors.Brand), INFO, SUCCESS, WARNING, FAILURE, INACTIVE, EARTH, TITAN, SUN, MARS
}
but the issue is that you cannot invoke that colors call without being in the context of Composabl;e
the end goal is to allow a composable to have a specific number of colors that it can accept, nothing outside that enum of colors
yea definitely this
thanks everyone
10 Views