copyWith method

  1. @override
TextDrawable copyWith({
  1. bool? hidden,
  2. Set<ObjectDrawableAssist>? assists,
  3. String? text,
  4. Offset? position,
  5. double? rotation,
  6. double? scale,
  7. TextStyle? style,
  8. bool? locked,
  9. TextDirection? direction,
})
override

Creates a copy of this but with the given fields replaced with the new values.

Implementation

@override
TextDrawable copyWith({
  bool? hidden,
  Set<ObjectDrawableAssist>? assists,
  String? text,
  Offset? position,
  double? rotation,
  double? scale,
  TextStyle? style,
  bool? locked,
  TextDirection? direction,
}) {
  return TextDrawable(
    text: text ?? this.text,
    position: position ?? this.position,
    rotation: rotation ?? rotationAngle,
    scale: scale ?? this.scale,
    style: style ?? this.style,
    direction: direction ?? this.direction,
    assists: assists ?? this.assists,
    hidden: hidden ?? this.hidden,
    locked: locked ?? this.locked,
  );
}