copyWith method
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,
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,
);