copyWith method

ConversationsLoaded copyWith({
  1. List<Conversation>? conversations,
  2. bool? hasMore,
  3. Set<String>? selectedConversations,
  4. String? activeConversationId,
  5. bool? isLoadingMore,
})

Create a copy of this state with updated fields

Implementation

ConversationsLoaded copyWith({
  List<Conversation>? conversations,
  bool? hasMore,
  Set<String>? selectedConversations,
  String? activeConversationId,
  bool? isLoadingMore,
}) {
  return ConversationsLoaded(
    conversations: conversations ?? this.conversations,
    hasMore: hasMore ?? this.hasMore,
    selectedConversations:
        selectedConversations ?? this.selectedConversations,
    activeConversationId: activeConversationId ?? this.activeConversationId,
    isLoadingMore: isLoadingMore ?? this.isLoadingMore,
  );
}