colorFromString function
Gets the Color from a representation letter
.
Implementation
Color colorFromString(String letter) {
if (_colorByLetter.containsKey(letter)) {
return _colorByLetter[letter]!;
} else {
throw ArgumentError('Invalid color letter: $letter');
}
}