Skip to main content
Question

Customizing UIs in Freshchat Flutter SDK

  • March 20, 2025
  • 2 replies
  • 76 views

chard1988
Contributor
Forum|alt.badge.img

Recently I tried using the Freshchat’s Flutter SDK on my project. Looking at the documentation; there is this method to load the topics (Conversations) by calling `Freshchat.showConversations();` but this loads a default UI. I want to have my own UI for this along with the conversation when a topic is tapped.

I’m thinking of using the API to achieve this but still looking for simpler ways.

Using API, I can load the topics/Channels but not sure how to load the messages from agent and requester once the topic(Channel) is tapped.

2 replies

ayham
Community Debut
  • Community Debut
  • May 11, 2025

srikanthkarunakaran
Skilled Expert
Forum|alt.badge.img+6

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:

  1. List Topics (Channels):
    Use GET /channels to retrieve all available topics for the user.

  2. Get Conversations for a Channel:
    When a topic is tapped, call GET /conversations?channel_id=... to fetch conversations tied to that channel and user.

  3. Fetch Messages in a Conversation:
    Use GET /conversations/{conversation_id}/messages to get the full chat history between the user and agent.

  4. 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!