icon_small2 method

double icon_small2({
  1. String? pageName,
  2. bool? isStatic,
})

Implementation

double icon_small2({String? pageName, bool? isStatic}) {
  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
        ? _sizeIconRatios["small"]!
        : getPageDynamicIconSizes(pageName, SizeType.small);
    double ratio2 = pageName == null
        ? _sizeIconRatios["medium"]!
        : getPageDynamicIconSizes(pageName, SizeType.medium);
    double dif = (ratio2 - ratio1);
    if (dif > ratio1) {
      dif = ratio1;
    }
    fontSize = calculateRatio(ratio1, dif, 2);
  } else {
    double fontSize1 = pageName == null
        ? _staticSizes["small"]!
        : getPageStaticIconSized(pageName, SizeType.small);
    double fontSize2 = pageName == null
        ? _staticSizes["medium"]!
        : getPageStaticIconSized(pageName, SizeType.medium);
    double dif = (fontSize2 - fontSize1);
    if (dif > fontSize1) {
      dif = fontSize1;
    }
    fontSize = calculateFontsize(fontSize1, dif, 2);
  }

  return fontSize;
}