copyWith method

CalendarMonthEvent copyWith({
  1. String? id,
  2. DateTime? startDate,
  3. DateTime? endDate,
  4. String? title,
  5. Color? background,
  6. String? iconUrl,
  7. Color? textColor,
  8. bool? isReadOnly,
})

Creates a copy of this event with the given fields updated.

Implementation

CalendarMonthEvent copyWith({
  String? id,
  DateTime? startDate,
  DateTime? endDate,
  String? title,
  Color? background,
  String? iconUrl,
  Color? textColor,
  bool? isReadOnly,
}) {
  return CalendarMonthEvent(
    id: id ?? this.id,
    startDate: startDate ?? this.startDate,
    endDate: endDate ?? this.endDate,
    title: title ?? this.title,
    background: background ?? this.background,
    iconUrl: iconUrl ?? this.iconUrl,
    textColor: textColor ?? this.textColor,
    isReadOnly: isReadOnly ?? this.isReadOnly,
  );
}