copyWith method

CalendarEvent<T> copyWith({
  1. String? id,
  2. String? title,
  3. DateTime? start,
  4. DateTime? end,
  5. bool? isAllDay,
  6. String? description,
  7. String? location,
  8. int? color,
  9. RecurrenceRule? recurrence,
  10. bool clearRecurrence = false,
  11. List<DateTime>? exceptionDates,
  12. List<DateTime>? additionalDates,
  13. String? timeZone,
  14. String? calendarId,
  15. EventStatus? status,
  16. EventVisibility? visibility,
  17. EventShowAs? showAs,
  18. EventType? type,
  19. EventPerson? organizer,
  20. List<EventAttendee>? attendees,
  21. List<EventReminder>? reminders,
  22. String? url,
  23. String? meetingUrl,
  24. T? data,
})

Copy with some fields replaced.

Implementation

CalendarEvent<T> copyWith({
  String? id,
  String? title,
  DateTime? start,
  DateTime? end,
  bool? isAllDay,
  String? description,
  String? location,
  int? color,
  RecurrenceRule? recurrence,
  bool clearRecurrence = false,
  List<DateTime>? exceptionDates,
  List<DateTime>? additionalDates,
  String? timeZone,
  String? calendarId,
  EventStatus? status,
  EventVisibility? visibility,
  EventShowAs? showAs,
  EventType? type,
  EventPerson? organizer,
  List<EventAttendee>? attendees,
  List<EventReminder>? reminders,
  String? url,
  String? meetingUrl,
  T? data,
}) =>
    CalendarEvent<T>(
      id: id ?? this.id,
      title: title ?? this.title,
      start: start ?? this.start,
      end: end ?? this.end,
      isAllDay: isAllDay ?? this.isAllDay,
      description: description ?? this.description,
      location: location ?? this.location,
      color: color ?? this.color,
      recurrence: clearRecurrence ? null : recurrence ?? this.recurrence,
      exceptionDates: exceptionDates ?? this.exceptionDates,
      additionalDates: additionalDates ?? this.additionalDates,
      timeZone: timeZone ?? this.timeZone,
      calendarId: calendarId ?? this.calendarId,
      status: status ?? this.status,
      visibility: visibility ?? this.visibility,
      showAs: showAs ?? this.showAs,
      type: type ?? this.type,
      organizer: organizer ?? this.organizer,
      attendees: attendees ?? this.attendees,
      reminders: reminders ?? this.reminders,
      url: url ?? this.url,
      meetingUrl: meetingUrl ?? this.meetingUrl,
      data: data ?? this.data,
    );