copyWith method
- String? id,
- List<
ChatMessageModel> ? messages, - int? unreadMessages,
- DateTime? lastUsed,
- ChatMessageModel? lastMessage,
- bool? canBeDeleted,
- 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,
);