font function
TextStyle
font(
- double value, {
- FontWeight? weight,
- dynamic color = "#666666",
- dynamic colorA,
- dynamic height,
- dynamic lineThrough = false,
- dynamic letterSpacing = false,
- dynamic fontFamily,
Implementation
TextStyle font(double value, {FontWeight? weight, color = "#666666", colorA, height, lineThrough = false, letterSpacing = false, fontFamily}) {
if (globalConfig.addFont! > 0) value = value + globalConfig.addFont;
return TextStyle(
fontWeight: weight ?? globalConfig.fontWeight,
fontSize: value.w,
fontFamily: fontFamily,
color: colorA ?? (color != null ? HexToColor(color) : null),
decoration: lineThrough ? TextDecoration.lineThrough : TextDecoration.none,
letterSpacing: letterSpacing ? -1 : 0,
height: height ?? 1.2,
);
}