withBackgroundColor method

String withBackgroundColor(
  1. ConsoleColor color
)

Color the background of this string with provided color codes, just use ConsoleColor

Implementation

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