getStyle static method

TextStyle getStyle(
  1. UiLabelTextType type, {
  2. Color? color,
  3. double? fontSize,
  4. FontWeight? fontWeight,
  5. double? letterSpacing,
  6. TextDecoration decoration = TextDecoration.none,
})

Implementation

static TextStyle getStyle(
  UiLabelTextType type, {
  Color? color,
  double? fontSize,
  FontWeight? fontWeight,
  double? letterSpacing,
  TextDecoration decoration = TextDecoration.none,
}) {
  return TextStyle(
    fontSize: fontSize ?? _defaultTextSize[type],
    fontWeight: fontWeight ?? _defaultFontWeight[type],
    letterSpacing: letterSpacing ?? _defaultLetterSpacing[type],
    decoration: decoration,
    color: color ?? Colors.black,
    height: 1.2,
    fontFamily: 'Roboto', // system fallback font
  );
}