copyWith method

TextStyle copyWith({
  1. PdfColor? color,
  2. Font? font,
  3. Font? fontNormal,
  4. Font? fontBold,
  5. Font? fontItalic,
  6. Font? fontBoldItalic,
  7. List<Font>? fontFallback,
  8. double? fontSize,
  9. FontWeight? fontWeight,
  10. FontStyle? fontStyle,
  11. double? letterSpacing,
  12. double? wordSpacing,
  13. double? lineSpacing,
  14. double? height,
  15. BoxDecoration? background,
  16. TextDecoration? decoration,
  17. PdfColor? decorationColor,
  18. TextDecorationStyle? decorationStyle,
  19. double? decorationThickness,
  20. PdfTextRenderingMode? renderingMode,
})

Implementation

TextStyle copyWith({
  PdfColor? color,
  Font? font,
  Font? fontNormal,
  Font? fontBold,
  Font? fontItalic,
  Font? fontBoldItalic,
  List<Font>? fontFallback,
  double? fontSize,
  FontWeight? fontWeight,
  FontStyle? fontStyle,
  double? letterSpacing,
  double? wordSpacing,
  double? lineSpacing,
  double? height,
  BoxDecoration? background,
  TextDecoration? decoration,
  PdfColor? decorationColor,
  TextDecorationStyle? decorationStyle,
  double? decorationThickness,
  PdfTextRenderingMode? renderingMode,
}) {
  return TextStyle(
    inherit: inherit,
    color: color ?? this.color,
    font: font ?? this.font,
    fontNormal: fontNormal ?? this.fontNormal,
    fontBold: fontBold ?? this.fontBold,
    fontItalic: fontItalic ?? this.fontItalic,
    fontBoldItalic: fontBoldItalic ?? this.fontBoldItalic,
    fontFallback: fontFallback ?? this.fontFallback,
    fontSize: fontSize ?? this.fontSize,
    fontWeight: fontWeight ?? this.fontWeight,
    fontStyle: fontStyle ?? this.fontStyle,
    letterSpacing: letterSpacing ?? this.letterSpacing,
    wordSpacing: wordSpacing ?? this.wordSpacing,
    lineSpacing: lineSpacing ?? this.lineSpacing,
    height: height ?? this.height,
    background: background ?? this.background,
    decoration: decoration ?? this.decoration,
    decorationColor: decorationColor ?? this.decorationColor,
    decorationStyle: decorationStyle ?? this.decorationStyle,
    decorationThickness: decorationThickness ?? this.decorationThickness,
    renderingMode: renderingMode ?? this.renderingMode,
  );
}