getBackGroundColor function

Color getBackGroundColor(
  1. String name
)

Implementation

Color getBackGroundColor(String name) {
  int nameHash = name.hashCode;
  int firstDigit = int.parse(nameHash.toString().substring(0, 1));

  return lightBrightColors[firstDigit] ?? lucyBlue;
}