copyWith method

CalendarEvent copyWith({
  1. int? id,
  2. int? portalId,
  3. Value<DateTime?> start = const Value.absent(),
  4. Value<DateTime?> end = const Value.absent(),
  5. bool? allDay,
  6. Value<String?> title = const Value.absent(),
  7. Value<String?> place = const Value.absent(),
  8. Value<String?> content = const Value.absent(),
  9. Value<String?> ownerName = const Value.absent(),
  10. Value<String?> creatorName = const Value.absent(),
})

Implementation

CalendarEvent copyWith({
  int? id,
  int? portalId,
  Value<DateTime?> start = const Value.absent(),
  Value<DateTime?> end = const Value.absent(),
  bool? allDay,
  Value<String?> title = const Value.absent(),
  Value<String?> place = const Value.absent(),
  Value<String?> content = const Value.absent(),
  Value<String?> ownerName = const Value.absent(),
  Value<String?> creatorName = const Value.absent(),
}) => CalendarEvent(
  id: id ?? this.id,
  portalId: portalId ?? this.portalId,
  start: start.present ? start.value : this.start,
  end: end.present ? end.value : this.end,
  allDay: allDay ?? this.allDay,
  title: title.present ? title.value : this.title,
  place: place.present ? place.value : this.place,
  content: content.present ? content.value : this.content,
  ownerName: ownerName.present ? ownerName.value : this.ownerName,
  creatorName: creatorName.present ? creatorName.value : this.creatorName,
);