copyWith method

Style copyWith({
  1. Color? backgroundColor,
  2. Color? color,
  3. TextDirection? direction,
  4. Display? display,
  5. String? fontFamily,
  6. List<String>? fontFamilyFallback,
  7. List<FontFeature>? fontFeatureSettings,
  8. FontSize? fontSize,
  9. FontStyle? fontStyle,
  10. FontWeight? fontWeight,
  11. double? height,
  12. LineHeight? lineHeight,
  13. double? letterSpacing,
  14. ListStyleType? listStyleType,
  15. ListStylePosition? listStylePosition,
  16. EdgeInsets? padding,
  17. EdgeInsets? margin,
  18. TextAlign? textAlign,
  19. TextDecoration? textDecoration,
  20. Color? textDecorationColor,
  21. TextDecorationStyle? textDecorationStyle,
  22. double? textDecorationThickness,
  23. List<Shadow>? textShadow,
  24. VerticalAlign? verticalAlign,
  25. WhiteSpace? whiteSpace,
  26. double? width,
  27. double? wordSpacing,
  28. String? before,
  29. String? after,
  30. Border? border,
  31. Alignment? alignment,
  32. Widget? markerContent,
  33. int? maxLines,
  34. TextOverflow? textOverflow,
  35. TextTransform? textTransform,
  36. bool? beforeAfterNull,
})

Implementation

Style copyWith({
  Color? backgroundColor,
  Color? color,
  TextDirection? direction,
  Display? display,
  String? fontFamily,
  List<String>? fontFamilyFallback,
  List<FontFeature>? fontFeatureSettings,
  FontSize? fontSize,
  FontStyle? fontStyle,
  FontWeight? fontWeight,
  double? height,
  LineHeight? lineHeight,
  double? letterSpacing,
  ListStyleType? listStyleType,
  ListStylePosition? listStylePosition,
  EdgeInsets? padding,
  EdgeInsets? margin,
  TextAlign? textAlign,
  TextDecoration? textDecoration,
  Color? textDecorationColor,
  TextDecorationStyle? textDecorationStyle,
  double? textDecorationThickness,
  List<Shadow>? textShadow,
  VerticalAlign? verticalAlign,
  WhiteSpace? whiteSpace,
  double? width,
  double? wordSpacing,
  String? before,
  String? after,
  Border? border,
  Alignment? alignment,
  Widget? markerContent,
  int? maxLines,
  TextOverflow? textOverflow,
  TextTransform? textTransform,
  bool? beforeAfterNull,
}) {
  return Style(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    color: color ?? this.color,
    direction: direction ?? this.direction,
    display: display ?? this.display,
    fontFamily: fontFamily ?? this.fontFamily,
    fontFamilyFallback: fontFamilyFallback ?? this.fontFamilyFallback,
    fontFeatureSettings: fontFeatureSettings ?? this.fontFeatureSettings,
    fontSize: fontSize ?? this.fontSize,
    fontStyle: fontStyle ?? this.fontStyle,
    fontWeight: fontWeight ?? this.fontWeight,
    height: height ?? this.height,
    lineHeight: lineHeight ?? this.lineHeight,
    letterSpacing: letterSpacing ?? this.letterSpacing,
    listStyleType: listStyleType ?? this.listStyleType,
    listStylePosition: listStylePosition ?? this.listStylePosition,
    padding: padding ?? this.padding,
    margin: margin ?? this.margin,
    textAlign: textAlign ?? this.textAlign,
    textDecoration: textDecoration ?? this.textDecoration,
    textDecorationColor: textDecorationColor ?? this.textDecorationColor,
    textDecorationStyle: textDecorationStyle ?? this.textDecorationStyle,
    textDecorationThickness:
        textDecorationThickness ?? this.textDecorationThickness,
    textShadow: textShadow ?? this.textShadow,
    verticalAlign: verticalAlign ?? this.verticalAlign,
    whiteSpace: whiteSpace ?? this.whiteSpace,
    width: width ?? this.width,
    wordSpacing: wordSpacing ?? this.wordSpacing,
    before: beforeAfterNull == true ? null : before ?? this.before,
    after: beforeAfterNull == true ? null : after ?? this.after,
    border: border ?? this.border,
    alignment: alignment ?? this.alignment,
    markerContent: markerContent ?? this.markerContent,
    maxLines: maxLines ?? this.maxLines,
    textOverflow: textOverflow ?? this.textOverflow,
    textTransform: textTransform ?? this.textTransform,
  );
}