copyWith method

TextStyle copyWith({
  1. Color? color,
  2. Color? backgroundColor,
  3. FontWeight? fontWeight,
  4. FontStyle? fontStyle,
  5. List<TextDecoration>? decoration,
  6. TextEffect? effect,
  7. int? attributes,
})

Copy with different properties

Implementation

TextStyle copyWith({
  Color? color,
  Color? backgroundColor,
  FontWeight? fontWeight,
  FontStyle? fontStyle,
  List<TextDecoration>? decoration,
  TextEffect? effect,
  int? attributes,
}) => TextStyle(
  color: color ?? this.color,
  backgroundColor: backgroundColor ?? this.backgroundColor,
  fontWeight: fontWeight ?? this.fontWeight,
  fontStyle: fontStyle ?? this.fontStyle,
  decoration: decoration ?? this.decoration,
  effect: effect ?? this.effect,
  attributes: attributes ?? this.attributes,
);