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(final String conversationId) {
  _currentConversation = _conversations.firstWhere(
    (final conv) => conv.id == conversationId,
  );
  _error = '';
  notifyListeners();
}