getTextStyle static method
dynamic
getTextStyle(
- String fontFamily,
- double fontSize,
- FontWeight fontWeight,
- Color? color,
- TextDecoration? textDecoration,
- FontStyle? fontStyle,
- double? lineHeight,
- double? letterSpacing,
Implementation
static getTextStyle(
String fontFamily,
double fontSize,
FontWeight fontWeight,
Color? color,
TextDecoration? textDecoration,
FontStyle? fontStyle,
double? lineHeight,
double? letterSpacing) {
return !GoogleFontsUtils().isGoogleFont(fontFamily)
? TextStyle(
fontFamily: fontFamily,
fontSize: fontSize,
fontWeight: fontWeight,
color: color,
decoration: textDecoration,
fontStyle: fontStyle,
height: lineHeight,
letterSpacing: letterSpacing,
)
: GoogleFonts.getFont(
fontFamily,
fontSize: fontSize,
fontWeight: fontWeight,
color: color,
decoration: textDecoration,
fontStyle: fontStyle,
height: lineHeight,
letterSpacing: letterSpacing,
);
}