copyWith method
Implementation
CalendarEvent copyWith({
String? title,
String? description,
DateTime? startTime,
DateTime? endTime,
bool? isAllDay,
Color? color,
String? location,
}) {
return CalendarEvent(
id: id,
title: title ?? this.title,
description: description ?? this.description,
startTime: startTime ?? this.startTime,
endTime: endTime ?? this.endTime,
isAllDay: isAllDay ?? this.isAllDay,
color: color ?? this.color,
icon: icon,
repeat: repeat,
reminder: reminder,
location: location ?? this.location,
attendees: attendees,
createdBy: createdBy,
extra: extra,
);
}