asTextStyle function

TextStyle asTextStyle({
  1. String? fontFamily,
  2. Color? color,
  3. double? size,
  4. double? height,
  5. TextDecoration? decoration,
  6. FontWeight? fontWeight,
  7. List<Shadow>? shadow,
  8. TextOverflow? overflow,
})

Implementation

TextStyle asTextStyle(
    {String? fontFamily,
      Color? color,
      double? size,
      double? height,
      TextDecoration? decoration,
      FontWeight? fontWeight,
      List<Shadow>? shadow,
      TextOverflow? overflow}) {
  color = color ?? Colors.black;
  return TextStyle(
      fontFamily: fontFamily ?? "p_reg",
      color: color,
      fontSize: size ?? 14,
      shadows: shadow,
      overflow: overflow,
      height: height,
      fontWeight: fontWeight,
      decoration: decoration);
}