getRandomColor function

Color getRandomColor()

Returns a random color generated using the dart:math library. The color has an alpha value of 255 and random red, green, and blue values.

Implementation

Color getRandomColor() {
  final random = Random();
  return Color.fromARGB(
    255,
    random.nextInt(256),
    random.nextInt(256),
    random.nextInt(256),
  );
}