fillEmpty method

void fillEmpty(
  1. List<String> colors
)

If the first element of the list is a valid color, then call the color function of the commandCaller object with the fillEmpty command and the index of the color.

Args: colors (List): The list of colors, only the first color is used.

Returns: The return type is void.

Implementation

void fillEmpty(List<String> colors) {
  final CatColors color = containsColor(colors.first);
  if (color != CatColors.NaC) {
    _commandCaller.color("fillEmpty", <dynamic>[color.index]);
  } else {
    _error = CatError.invalidColor;

    return;
  }
}