ansiStyle2TextStyle function

TextStyle ansiStyle2TextStyle(
  1. Style style, {
  2. double? fontSize,
})

Implementation

TextStyle ansiStyle2TextStyle(ansi.Style style, {double? fontSize}) =>
    TextStyle(
      fontSize: fontSize,
      color: ansiColor2Color(style.foregroundColor),
      backgroundColor: ansiColor2Color(style.backgroundColor),
      fontWeight: style.isBold ? FontWeight.bold : null,
      fontStyle: style.isItalic ? FontStyle.italic : null,
      decoration: style.isUnderline ? TextDecoration.underline : null,
    );