getTextStyle method
Implementation
TextStyle getTextStyle(String value) {
FlutlyVariable generalConfig = Get.find(tag: "general");
bool googleFontActive = generalConfig.childExists("google_font");
if (googleFontActive) {
return GoogleFonts.getFont(
generalConfig.getChild("google_font").getValue(),
textStyle: TextStyle(
fontSize: size,
fontWeight: getFontWeight(value),
color: getColor(value),
fontStyle: getFontStyle(value),
overflow: getTextOverflow(value),
),
);
}
String fontFamily = generalConfig.getChild("custom_fount").getValue();
return TextStyle(
fontSize: size,
fontWeight: getFontWeight(value),
color: getColor(value),
fontStyle: getFontStyle(value),
overflow: getTextOverflow(value),
fontFamily: fontFamily,
);
}