Skip to main content
This guide builds a two-panel chat layout — conversation list that navigates to a message screen. Users tap a conversation to open it. This assumes you’ve already completed Getting Started (project created, UI Kit installed, init + login working).
View Sample App on GitHub

What You’re Building

Two screens working together:
  1. Conversation list — shows all active conversations (users and groups)
  2. Message screen — header + messages + composer for the selected conversation

Step 1 — Create the Conversations Screen

The CometChatConversations widget displays all conversations. Tapping one navigates to the message screen.
lib/conversations_page.dart
Key points:
  • onItemTap fires when a conversation is tapped, passing the Conversation object.
  • conversationWith returns either a User or Group — pass the correct one to the message screen.

Step 2 — Create the Messages Screen

The message screen combines header, message list, and composer.
lib/messages_screen.dart

Step 3 — Run the App

You should see the conversation list. Tapping a conversation navigates to the message screen.

Next Steps

Conversations

Customize the conversation list

Message List

Customize the message view

Theming

Customize colors and styles

Events

Handle real-time events