copyWith method
Returns new object of CalendarEventData with the updated values defined as the arguments.
Implementation
CalendarEventData<T> copyWith({
String? title,
String? description,
T? event,
Color? color,
DateTime? startTime,
DateTime? endTime,
TextStyle? titleStyle,
TextStyle? descriptionStyle,
DateTime? endDate,
DateTime? date,
}) {
return CalendarEventData(
title: title ?? this.title,
date: date ?? this.date,
startTime: startTime ?? this.startTime,
endTime: endTime ?? this.endTime,
color: color ?? this.color,
description: description ?? this.description,
descriptionStyle: descriptionStyle ?? this.descriptionStyle,
endDate: endDate ?? this.endDate,
event: event ?? this.event,
titleStyle: titleStyle ?? this.titleStyle,
);
}