copyWith method
Creates a copy of this value but with the given fields replaced with the new values.
Implementation
WindowPaintValue copyWith({
String? mode,
Color? color,
List<DrawObject>? objects,
Color? colorBeforeSelection,
int? selectedObjectIndex,
}) {
return WindowPaintValue(
mode: mode ?? this.mode,
color: color ?? this.color,
objects: objects ?? this.objects,
colorBeforeSelection: colorBeforeSelection ?? this.colorBeforeSelection,
selectedObjectIndex: selectedObjectIndex ?? this.selectedObjectIndex,
);
}