font function

TextStyle font(
  1. double value, {
  2. FontWeight? weight,
  3. dynamic color = "#666666",
  4. dynamic colorA,
  5. dynamic height,
  6. dynamic lineThrough = false,
  7. dynamic letterSpacing = false,
  8. 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,
  );
}