withTextStyle method

String withTextStyle(
  1. ConsoleTextModifier modifier
)

Change the style of this string with provided text modifiers, just use ConsoleTextModifier

Implementation

String withTextStyle(ConsoleTextModifier modifier) =>
    '${modifier.code}$this\x1B[0m';