copyWith method

  1. @override
PersonalChatModel copyWith({
  1. String? id,
  2. List<ChatMessageModel>? messages,
  3. int? unreadMessages,
  4. DateTime? lastUsed,
  5. ChatMessageModel? lastMessage,
  6. bool? canBeDeleted,
  7. ChatUserModel? user,
})
override

Implementation

@override
PersonalChatModel copyWith({
  String? id,
  List<ChatMessageModel>? messages,
  int? unreadMessages,
  DateTime? lastUsed,
  ChatMessageModel? lastMessage,
  bool? canBeDeleted,
  ChatUserModel? user,
}) =>
    PersonalChatModel(
      id: id ?? this.id,
      messages: messages ?? this.messages,
      unreadMessages: unreadMessages ?? this.unreadMessages,
      lastUsed: lastUsed ?? this.lastUsed,
      lastMessage: lastMessage ?? this.lastMessage,
      user: user ?? this.user,
      canBeDeleted: canBeDeleted ?? this.canBeDeleted,
    );