copyWith method
- String? id,
- List<
ChatMessageModel> ? messages, - int? unreadMessages,
- DateTime? lastUsed,
- ChatMessageModel? lastMessage,
- bool? canBeDeleted,
- String? title,
- String? imageUrl,
- List<
ChatUserModel> ? users,
override
Implementation
@override
GroupChatModel copyWith({
String? id,
List<ChatMessageModel>? messages,
int? unreadMessages,
DateTime? lastUsed,
ChatMessageModel? lastMessage,
bool? canBeDeleted,
String? title,
String? imageUrl,
List<ChatUserModel>? users,
}) =>
GroupChatModel(
id: id ?? this.id,
messages: messages ?? this.messages,
unreadMessages: unreadMessages ?? this.unreadMessages,
lastUsed: lastUsed ?? this.lastUsed,
lastMessage: lastMessage ?? this.lastMessage,
canBeDeleted: canBeDeleted ?? this.canBeDeleted,
title: title ?? this.title,
imageUrl: imageUrl ?? this.imageUrl,
users: users ?? this.users,
);