override method

TextStyle override({
  1. String? fontFamily,
  2. Color? color,
  3. double? fontSize,
  4. FontWeight? fontWeight,
  5. FontStyle? fontStyle,
  6. bool useGoogleFonts = true,
  7. TextDecoration? decoration,
  8. double? lineHeight,
})

Implementation

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