getRandomColor function

Color getRandomColor()

Implementation

Color getRandomColor() {
  Random random = Random();
  // Define a list of specific colors
  List<Color> predefinedColors = [
    ColorHelper.primaryBlue_01,
    ColorHelper.teal_03,
    ColorHelper.red04,
    ColorHelper.purple2,
  ];

  // Randomly pick one of the predefined colors
  return predefinedColors[random.nextInt(predefinedColors.length)];

  // return Color.fromARGB(
  //   255,
  //   random.nextInt(256),
  //   random.nextInt(256),
  //   random.nextInt(256),
  // );
}