copyWith method

ChatSessionResponse copyWith({
  1. int? id,
  2. String? guid,
  3. UserViewModel? taskOwner,
  4. UserViewModel? user,
  5. TaskViewModel? task,
  6. DateTime? lastMessageAt,
  7. int? unreadMessages,
})

Implementation

ChatSessionResponse copyWith(
    {int? id,
    String? guid,
    UserViewModel? taskOwner,
    UserViewModel? user,
    TaskViewModel? task,
    DateTime? lastMessageAt,
    int? unreadMessages}) {
  return ChatSessionResponse(
      id: id ?? this.id,
      guid: guid ?? this.guid,
      taskOwner: taskOwner ?? this.taskOwner,
      user: user ?? this.user,
      task: task ?? this.task,
      lastMessageAt: lastMessageAt ?? this.lastMessageAt,
      unreadMessages: unreadMessages ?? this.unreadMessages);
}