toTextStyle method

TextStyle toTextStyle({
  1. Color? color,
  2. Color? backgroundColor,
  3. bool bold = false,
  4. bool italic = false,
  5. bool underline = false,
})

Implementation

TextStyle toTextStyle({
  Color? color,
  Color? backgroundColor,
  bool bold = false,
  bool italic = false,
  bool underline = false,
}) {
  return TextStyle(
    fontSize: fontSize,
    height: height,
    fontFamily: fontFamily,
    fontFamilyFallback: fontFamilyFallback,
    color: color,
    backgroundColor: backgroundColor,
    fontWeight: bold ? FontWeight.bold : FontWeight.normal,
    fontStyle: italic ? FontStyle.italic : FontStyle.normal,
    decoration: underline ? TextDecoration.underline : TextDecoration.none,
  );
}