https://kotlinlang.org logo
Title
r

r

04/03/2023, 4:24 PM
hi everyone! I used to have a function like this:
fun randomColor(): ColorResource.Single {
        return BASE_COLORS[Random.nextInt(BASE_COLORS.size)]
    }
where `BASE_COLORS`is an array of
ColorResource
but after upgrading moko library I cannot do that anymore and I'm not sure how to do it with the new implementation. Any ideas?
a

alex009

04/03/2023, 5:36 PM
please check
ColorDesc
interface and implementations. it's replacement for old
ColorResource
. new
ColorResource
is platform-based like other resources
r

r

04/03/2023, 10:07 PM
Will do! thank you