copyWith method

CalendarEvent copyWith({
  1. String? title,
  2. String? description,
  3. DateTime? startTime,
  4. DateTime? endTime,
  5. bool? isAllDay,
  6. Color? color,
  7. String? location,
})

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