I have an Enum: ```enum class ViewTypes { TODAY, LAST_7_DAYS, LAST_14_DAYS, TOTAL, }...
d
I have an Enum:
Copy code
enum class ViewTypes {
    TODAY,
    LAST_7_DAYS,
    LAST_14_DAYS,
    TOTAL,
}
and I would like to loop through it:
Copy code
for (viewType in ViewTypes) {
...
}
but it gives me an error:
Classifier 'ViewTypes' does not have a companion object, and thus must be initialized here
๐Ÿงต 2
n
IIRC
ViewTypes.values()
works too
๐Ÿ‘ 1
o
@Daniele B Use thread, please.
d
ok sorry