large6 method

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

Implementation

TextStyle large6(
    {Color? color,
    bool? isBold,
    String? fontFamily,
    String? pageName,
    TextDecoration? decoration,
    Color? backgroundColor,
    FontWeight fontWeight = FontWeight.normal,
    bool? isStatic}) {
  color ??= Get.find<AppColors>().textColor;
  late double fontSize;
  if ((isStatic == null &&
          isStaticDefault == null &&
          Get.find<AppSettings>().properties.screenMode ==
              ScreenMode.mobile) ||
      (isStatic == null && isStaticDefault == false) ||
      isStatic == false) {
    double ratio1 = pageName == null
        ? _sizeRatios["large"]!
        : getPageDynamicFonts(pageName, SizeType.large);
    double ratio2 = pageName == null
        ? _sizeRatios["mega"]!
        : getPageDynamicFonts(pageName, SizeType.mega);
    double dif = (ratio2 - ratio1);
    if (dif > ratio1) {
      dif = ratio1;
    }
    fontSize = calculateRatio(ratio1, dif, 6);
  } else {
    double fontSize1 = pageName == null
        ? _staticSizes["large"]!
        : getPageStaticFonts(pageName, SizeType.large);
    double fontSize2 = pageName == null
        ? _staticSizes["mega"]!
        : getPageStaticFonts(pageName, SizeType.mega);
    double dif = (fontSize2 - fontSize1);
    if (dif > fontSize1) {
      dif = fontSize1;
    }
    fontSize = calculateFontsize(fontSize1, dif, 6);
  }
  return GoogleFonts.getFont(
      fontFamily ??
          (pageName != null
              ? Get.find<PageManager>()
                  .getPageFontFamily(pageName, SizeType.large)
              : defaultFontFamily),
      fontSize: fontSize,
      color: color,
      decoration: decoration,
      backgroundColor: backgroundColor,
      fontWeight: isBold == null
          ? fontWeight
          : isBold
              ? FontWeight.bold
              : FontWeight.normal);
}