colorTypeToString function

String colorTypeToString(
  1. ColorsTypes color
)

Returns the string value of the given color type.

Implementation

String colorTypeToString(ColorsTypes color) {
  switch (color) {
    case ColorsTypes.Gray:
      return 'gray';
    case ColorsTypes.Brown:
      return 'brown';
    case ColorsTypes.Orange:
      return 'orange';
    case ColorsTypes.Yellow:
      return 'yellow';
    case ColorsTypes.Green:
      return 'green';
    case ColorsTypes.Blue:
      return 'blue';
    case ColorsTypes.Purple:
      return 'purple';
    case ColorsTypes.Pink:
      return 'pink';
    case ColorsTypes.Red:
      return 'red';
    case ColorsTypes.Default:
      return 'default';
  }
}