alternatingColorForIndex function
Gets an alternating color to use for indexed UI elements.
Implementation
Color alternatingColorForIndex(int index, ColorScheme colorScheme) {
return index % 2 == 1
? colorScheme.alternatingBackgroundColor1
: colorScheme.alternatingBackgroundColor2;
}