color: Colors.primaries[Random().nextInt(Colors.primaries.length)], or use package random_color 1.0.5