copyWith method
CommentViewModel
copyWith({
- int? id,
- String? body,
- int? entityId,
- CommentType? entityType,
- UserViewModel? user,
- DateTime? updatedAt,
- DateTime? createdAt,
Implementation
CommentViewModel copyWith(
{int? id,
String? body,
int? entityId,
enums.CommentType? entityType,
UserViewModel? user,
DateTime? updatedAt,
DateTime? createdAt}) {
return CommentViewModel(
id: id ?? this.id,
body: body ?? this.body,
entityId: entityId ?? this.entityId,
entityType: entityType ?? this.entityType,
user: user ?? this.user,
updatedAt: updatedAt ?? this.updatedAt,
createdAt: createdAt ?? this.createdAt);
}