copyWith method

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

Implementation

Style copyWith({
  Color? backgroundColor,
  Color? color,
  TextDirection? direction,
  Display? display,
  String? fontFamily,
  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,
    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,
  );
}