copyWith method

CalendarEventData<T> copyWith({
  1. String? title,
  2. String? description,
  3. T? event,
  4. Color? color,
  5. DateTime? startTime,
  6. DateTime? endTime,
  7. TextStyle? titleStyle,
  8. TextStyle? descriptionStyle,
  9. DateTime? endDate,
  10. DateTime? date,
})

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