copyWith method

  1. @override
GroupChatModel copyWith({
  1. String? id,
  2. List<ChatMessageModel>? messages,
  3. int? unreadMessages,
  4. DateTime? lastUsed,
  5. ChatMessageModel? lastMessage,
  6. bool? canBeDeleted,
  7. String? title,
  8. String? imageUrl,
  9. 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,
    );