getStyleAnsi method
Builds and returns the ANSI style code string for this style.
Includes font style codes, foreground, and background colors if defined. Also logs the generated style code via Logger.trace.
Implementation
String getStyleAnsi() {
final codes = [
for (var style in styles) style.code,
if (color != null) color!.fg,
if (bgColor != null) bgColor!.bg,
].join(';');
Logger.trace("TextComponentStyle", codes.split(';').join(':'));
return codes;
}