int idx = 2;
print(ThemeColor.values[idx]);
should give you
ThemeColor.blue
You can use:
ThemeColor.red.index
should give you
0
int idx = 2;
print(ThemeColor.values[idx]);
should give you
ThemeColor.blue
You can use:
ThemeColor.red.index
should give you
0