selectConversation method

void selectConversation(
  1. String conversationId
)

Selects a conversation by its ID.

The conversationId should match an existing conversation. Clears any current error when a conversation is selected.

Implementation

void selectConversation(String conversationId) {
  _currentConversation =
      _conversations.firstWhere((conv) => conv.id == conversationId);
  _error = '';
  notifyListeners();
}