Hi @chard1988 :
You're right — the Freshchat.showConversations()
method in the Flutter SDK loads the default conversation UI, and currently, the SDK doesn’t provide a built-in way to customize this interface or directly access messages for building a custom UI.
If you’d like to implement your own UI for listing topics (channels) and showing messages when a topic is tapped, you can achieve this using the Freshchat REST APIs. Here's how:
-
List Topics (Channels):
Use GET /channels
to retrieve all available topics for the user.
-
Get Conversations for a Channel:
When a topic is tapped, call GET /conversations?channel_id=...
to fetch conversations tied to that channel and user.
-
Fetch Messages in a Conversation:
Use GET /conversations/{conversation_id}/messages
to get the full chat history between the user and agent.
-
Send Messages:
You can send messages using POST /conversations/{conversation_id}/messages
.
This approach allows you full control to build a custom chat experience in Flutter. However, since these APIs are generally meant for server-side use, you may need to handle authentication via a backend service to securely fetch and post messages on behalf of the user.
Let us know if you'd like help with setting up the API flow or designing your custom UI — happy to assist!