copyWith method

WindowPaintValue copyWith({
  1. String? mode,
  2. Color? color,
  3. List<DrawObject>? objects,
  4. Color? colorBeforeSelection,
  5. int? selectedObjectIndex,
})

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,
  );
}