getConversation method

  1. @override
ChatwootConversation? getConversation()
override

Implementation

@override
ChatwootConversation? getConversation() {
  if (_box.values.length == 0) {
    return null;
  }

  final conversationidentifierString =
      _clientInstanceIdToConversationIdentifierBox.get(_clientInstanceKey);
  final conversationIdentifier =
      int.tryParse(conversationidentifierString ?? "");

  if (conversationIdentifier == null) {
    return null;
  }

  return _box.get(conversationIdentifier);
}