withColor method

String withColor(
  1. ConsoleColor color
)

Color this string with provided color codes, just use ConsoleColor

Implementation

String withColor(ConsoleColor color) => '${color.textCode}$this\x1B[0m';