baseTextStyle method
TextStyle
baseTextStyle(
- double fontSize, {
- FontWeight fontWeight = FontWeight.normal,
- double lineHeight = 1.2,
- Color? color,
Builds the base TextStyle using GoogleFonts.poppins.
fontSize: base font size before scaling.
fontWeight: weight of the text (default: normal).
lineHeight: height of line spacing.
color: text color (defaults to colorText).
Implementation
TextStyle baseTextStyle(
double fontSize, {
FontWeight fontWeight = FontWeight.normal,
double lineHeight = 1.2,
Color? color,
}) {
TextStyle style = GoogleFonts.montserrat(
fontSize: fontSize.scaleBoth(this),
fontWeight: fontWeight,
height: lineHeight,
color: color ?? text,
);
// Apply dynamic font
return DynamicFontController.instance.applyFont(style);
}