copyWith method

SceneTextStyle copyWith({
  1. String? fontFamily,
  2. double? fontSize,
  3. SceneFontWeight? weight,
  4. bool? italic,
  5. double? letterSpacing,
  6. double? wordSpacing,
  7. double? lineHeight,
  8. SceneColor? color,
  9. SceneTextCase? textCase,
  10. SceneTextDecoration? decoration,
  11. SceneColor? decorationColor,
  12. double? decorationThickness,
  13. SceneTextDecorationStyle? decorationStyle,
  14. List<TextLayer>? layers,
  15. Map<String, double>? axes,
})

This style with values laid over it — the delta spelling a node uses, and the one place the file says "that treatment, but bigger". A null argument is "not given": a style cannot unset a property, because resetting to the style is what the editor does instead.

Implementation

SceneTextStyle copyWith({
  String? fontFamily,
  double? fontSize,
  SceneFontWeight? weight,
  bool? italic,
  double? letterSpacing,
  double? wordSpacing,
  double? lineHeight,
  SceneColor? color,
  SceneTextCase? textCase,
  SceneTextDecoration? decoration,
  SceneColor? decorationColor,
  double? decorationThickness,
  SceneTextDecorationStyle? decorationStyle,
  List<TextLayer>? layers,
  Map<String, double>? axes,
}) => SceneTextStyle(
  fontFamily: fontFamily ?? this.fontFamily,
  fontSize: fontSize ?? this.fontSize,
  weight: weight ?? this.weight,
  italic: italic ?? this.italic,
  letterSpacing: letterSpacing ?? this.letterSpacing,
  wordSpacing: wordSpacing ?? this.wordSpacing,
  lineHeight: lineHeight ?? this.lineHeight,
  color: color ?? this.color,
  textCase: textCase ?? this.textCase,
  decoration: decoration ?? this.decoration,
  decorationColor: decorationColor ?? this.decorationColor,
  decorationThickness: decorationThickness ?? this.decorationThickness,
  decorationStyle: decorationStyle ?? this.decorationStyle,
  layers: layers ?? this.layers,
  axes: axes ?? this.axes,
);