copyWith method

ConversationItemModel copyWith({
  1. ChatUIKitProfile? profile,
  2. Message? lastMessage,
  3. int? unreadCount,
  4. bool? pinned,
  5. bool? noDisturb,
  6. bool? hasMention,
  7. Map<String, String>? attributes,
})

Implementation

ConversationItemModel copyWith({
  ChatUIKitProfile? profile,
  Message? lastMessage,
  int? unreadCount,
  bool? pinned,
  bool? noDisturb,
  bool? hasMention,
  Map<String, String>? attributes,
}) {
  return ConversationItemModel(
    profile: profile ?? this.profile,
    lastMessage: lastMessage ?? this.lastMessage,
    unreadCount: unreadCount ?? this.unreadCount,
    pinned: pinned ?? this.pinned,
    noDisturb: noDisturb ?? this.noDisturb,
    hasMention: hasMention ?? this.hasMention,
    attributes: attributes ?? this.attributes,
  );
}