call method

Color call(
  1. Object step
)

Возвращает цвет по любому шагу.

Implementation

Color call(Object step) {
  final key = step.toString();
  final color = colors[key];
  if (color == null) {
    throw ArgumentError.value(step, 'step', 'Цветовой шаг не найден.');
  }
  return color;
}