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