getRandomColor static method

Color getRandomColor(
  1. int index
)

Implementation

static Color getRandomColor(int index) {
  Color returnColor = Colors.white;
  int idx = index;
  while (idx >= md_color_random.length) {
    idx = idx - 5;
  }
  while (idx < 0) {
    idx = idx + 2;
  }
  returnColor = md_color_random[idx];
  return returnColor;
}