mega5 method
TextStyle
mega5({
- Color? color,
- bool? isBold,
- String? pageName,
- TextDecoration? decoration,
- Color? backgroundColor,
- String? fontFamily,
- FontWeight fontWeight = FontWeight.normal,
- bool? isStatic,
Implementation
TextStyle mega5(
{Color? color,
bool? isBold,
String? pageName,
TextDecoration? decoration,
Color? backgroundColor,
String? fontFamily,
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 ratio = pageName == null
? _sizeRatios["mega"]!
: getPageDynamicFonts(pageName, SizeType.mega);
fontSize = ratio * _totalSize;
} else {
fontSize = pageName == null
? _staticSizes["mega"]!
: getPageStaticFonts(pageName, SizeType.mega);
}
return GoogleFonts.getFont(
fontFamily ??
(pageName != null
? Get.find<PageManager>()
.getPageFontFamily(pageName, SizeType.mega)
: defaultFontFamily),
fontSize: fontSize,
color: color,
decoration: decoration,
backgroundColor: backgroundColor,
fontWeight: isBold == null
? fontWeight
: isBold
? FontWeight.bold
: FontWeight.normal);
}