getColor static method
Returns a set of values depending on the color
variable.
If the variable is null
, it'll then return a random set of colors.
Implementation
static AdwAvatarColor getColor(AdwColors? color) {
if (color != null) return _palette[color]!;
final randomColor =
AdwColors.values[Random().nextInt(AdwColors.values.length)];
return _palette[randomColor]!;
}