getColor method

Color getColor(
  1. String colorName
)

Gets the color for a given color name based on the current appearance.

Implementation

Color getColor(String colorName) {
  if (colors[colorName] == null) {
    throw ArgumentError(
        "Color name '$colorName' not found in colors map $colors");
  }
  return colors[colorName]![
      appearanceNotifier.value.toString().split('.').last];
}