toTextStyle method
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,
);
}