override method
TextStyle
override(
{ - String? fontFamily,
- Color? color,
- double? fontSize,
- FontWeight? fontWeight,
- double? letterSpacing,
- FontStyle? fontStyle,
- bool useGoogleFonts = true,
- TextDecoration? decoration,
- double? lineHeight,
- List<Shadow>? shadows,
})
Implementation
TextStyle override({
String? fontFamily,
Color? color,
double? fontSize,
FontWeight? fontWeight,
double? letterSpacing,
FontStyle? fontStyle,
bool useGoogleFonts = true,
TextDecoration? decoration,
double? lineHeight,
List<Shadow>? shadows,
}) =>
useGoogleFonts
? GoogleFonts.getFont(
fontFamily!,
color: color ?? this.color,
fontSize: fontSize ?? this.fontSize,
letterSpacing: letterSpacing ?? this.letterSpacing,
fontWeight: fontWeight ?? this.fontWeight,
fontStyle: fontStyle ?? this.fontStyle,
decoration: decoration,
height: lineHeight,
shadows: shadows,
)
: copyWith(
fontFamily: fontFamily,
color: color,
fontSize: fontSize,
letterSpacing: letterSpacing,
fontWeight: fontWeight,
fontStyle: fontStyle,
decoration: decoration,
height: lineHeight,
shadows: shadows,
);