specific method

TextStyle specific({
  1. required String specificType,
  2. Color? color,
  3. String? fontFamily,
  4. TextDecoration? decoration,
  5. Color? backgroundColor,
  6. bool? isBold,
  7. FontWeight fontWeight = FontWeight.normal,
})

Implementation

TextStyle specific(
    {required String specificType,
    Color? color,
    String? fontFamily,
    TextDecoration? decoration,
    Color? backgroundColor,
    bool? isBold,
    FontWeight fontWeight = FontWeight.normal}) {
  color ??= Get.find<AppColors>().textColor;
  return GoogleFonts.getFont(fontFamily ?? defaultFontFamily,
      fontSize: _specificSizes[specificType],
      color: color,
      decoration: decoration,
      backgroundColor: backgroundColor,
      fontWeight: isBold == null
          ? fontWeight
          : isBold
              ? FontWeight.bold
              : FontWeight.normal);
}