getStyle static method
TextStyle
getStyle(
{ - TextStyle? textStyle,
- int? fontWeight = 500,
- bool muted = false,
- bool xMuted = false,
- double? letterSpacing,
- Color? color,
- TextDecoration decoration = TextDecoration.none,
- double? height,
- double? wordSpacing,
- double? fontSize,
})
Implementation
static TextStyle getStyle(
{TextStyle? textStyle,
int? fontWeight = 500,
bool muted = false,
bool xMuted = false,
double? letterSpacing,
Color? color,
TextDecoration decoration = TextDecoration.none,
double? height,
double? wordSpacing,
double? fontSize}) {
double? finalFontSize = fontSize != null ? fontSize : (textStyle == null ? 40 : textStyle.fontSize);
Color finalColor = color ?? FxAppTheme.theme.colorScheme.onBackground;
finalColor = xMuted ? finalColor.withAlpha(160) : (muted ? finalColor.withAlpha(200) : finalColor);
return _fontFamily(
fontSize: finalFontSize,
fontWeight: _defaultFontWeight[fontWeight],
letterSpacing: letterSpacing,
color: finalColor,
decoration: decoration,
height: height,
wordSpacing: wordSpacing);
}