font method
TextStyle
font({
- double size = 14,
- NUIThemePair<
Color> ? colorPair, - Color? color,
- String? fontName,
- NUIFontType fontType = NUIFontType.REGULAR,
- bool isBold = false,
- Shadow? shadow,
- FontWeight? fontWeight,
- TextDecoration decoration = TextDecoration.none,
- bool isItalic = false,
- List<
FontFeature> ? fontFeatures,
Implementation
TextStyle font({
double size = 14,
NUIThemePair<Color>? colorPair,
Color? color,
String? fontName,
NUIFontType fontType = NUIFontType.REGULAR,
bool isBold = false,
Shadow? shadow,
FontWeight? fontWeight,
TextDecoration decoration = TextDecoration.none,
bool isItalic = false,
List<FontFeature>? fontFeatures
}){
return TextStyle(
fontSize: (size) * (_textScaleFactor ?? 1.0),
color: colorPair != null ? this.color(colorPair) : color ?? Colors.black,
fontWeight: fontWeight ?? (isBold ? FontWeight.bold : FontWeight.normal),
shadows: shadow != null ? [shadow] : [],
decoration: decoration,
fontFamily: fontName ?? _fontTheme?.fontByType(fontType),
fontStyle: isItalic ? FontStyle.italic : FontStyle.normal,
fontFeatures: fontFeatures
);
}