> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-rn-guide-message-privately.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Message Privately

> Initiate private one-on-one chats with group members directly from group chat in CometChat Flutter UI Kit.

<Accordion title="AI Agent Component Spec">
  | Field          | Value                                                                             |
  | -------------- | --------------------------------------------------------------------------------- |
  | Package        | `cometchat_chat_uikit`                                                            |
  | Key components | `CometchatUserInfo`, `CometChatMessageList`, `PageManager`                        |
  | Init           | `CometChatUIKit.init(uiKitSettings)` then `CometChatUIKit.login(uid)`             |
  | Entry point    | Group member tap → `CometchatUserInfo` → "Message" action                         |
  | Sample app     | [GitHub](https://github.com/cometchat/cometchat-uikit-flutter/tree/v5/sample_app) |
  | Related        | [All Guides](/ui-kit/flutter/v5/guide-overview)                                   |
</Accordion>

Message Privately lets users start a direct one-on-one chat with a group member.

Before starting, complete the [Getting Started](/ui-kit/flutter/v5/getting-started) guide.

***

## Components

| Component / Class             | Role                                                 |
| :---------------------------- | :--------------------------------------------------- |
| `CometChatMessageList`        | Displays group messages and user avatars             |
| `CometchatUserInfo`           | Shows user details and actions (e.g., call, message) |
| `CometChatUserInfoController` | Manages user info state and actions                  |
| `PageManager`                 | Handles navigation to the private chat screen        |

***

## Integration Steps

### 1. Navigate to User Info

Open the user info screen when tapping on a group member's profile or info icon.

*File: [cometchat\_group\_info.dart](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app/lib/group_info/cometchat_group_info.dart)*

```dart theme={null}
Navigator.push(
  context,
  MaterialPageRoute(
    builder: (context) => CometchatUserInfo(user: selectedUser),
  ),
);
```

***

### 2. Display User Profile with Actions

The `CometchatUserInfo` widget displays the user's profile with action tiles for voice call, video call, and messaging.

*File: [cometchat\_user\_info.dart](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app/lib/user_info/cometchat_user_info.dart)*

```dart theme={null}
Widget _getOptionTiles(CometChatUserInfoController controller) {
  return Row(
    mainAxisAlignment: MainAxisAlignment.spaceBetween,
    children: [
      tile(
        Icon(Icons.call_outlined, color: colorPalette.iconHighlight),
        Translations.of(context).voice,
        () => controller.initiateCallWorkflow(CallTypeConstants.audioCall, context),
      ),
      tile(
        Icon(Icons.videocam_outlined, color: colorPalette.iconHighlight),
        Translations.of(context).video,
        () => controller.initiateCallWorkflow(CallTypeConstants.videoCall, context),
      ),
    ],
  );
}
```

***

### 3. Start Private Chat

Navigate to the private chat screen using `PageManager` when the user wants to message privately.

*File: [page\_manager.dart](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app/lib/utils/page_manager.dart)*

```dart theme={null}
PageManager().navigateToMessages(
  context: context,
  user: user,
);
```

***

### 4. Handle Mentions Navigation

When a user taps on a mention in a message, navigate to that user's profile or start a private chat.

*File: [cometchat\_thread.dart](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app/lib/thread_screen/cometchat_thread.dart)*

```dart theme={null}
CometChatMentionsFormatter getMentionsTap() {
  return CometChatMentionsFormatter(
    user: widget.user,
    group: widget.group,
    onMentionTap: (mention, mentionedUser, {message}) {
      if (mentionedUser.uid != CometChatUIKit.loggedInUser!.uid) {
        PageManager().navigateToMessages(
          context: context,
          user: mentionedUser,
        );
      }
    },
  );
}
```

***

## Feature Matrix

| Feature           | Component / Method               | File                                                                                                                                                                |
| :---------------- | :------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| User info screen  | `CometchatUserInfo`              | [cometchat\_user\_info.dart](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app/lib/user_info/cometchat_user_info.dart)                        |
| Voice/video call  | `initiateCallWorkflow()`         | [cometchat\_user\_info\_controller.dart](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app/lib/user_info/cometchat_user_info_controller.dart) |
| Navigate to chat  | `PageManager.navigateToMessages` | [page\_manager.dart](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app/lib/utils/page_manager.dart)                                           |
| Mention tap       | `CometChatMentionsFormatter`     | [cometchat\_thread.dart](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app/lib/thread_screen/cometchat_thread.dart)                           |
| Access from group | Group member list                | [cometchat\_group\_info.dart](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app/lib/group_info/cometchat_group_info.dart)                     |

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Groups" href="/ui-kit/flutter/v5/groups">
    Display and manage group lists.
  </Card>

  <Card title="Group Members" href="/ui-kit/flutter/v5/group-members">
    View and manage group members.
  </Card>

  <Card title="Message List" href="/ui-kit/flutter/v5/message-list">
    Display messages in private chats.
  </Card>

  <Card title="All Guides" href="/ui-kit/flutter/v5/guide-overview">
    Browse all feature and formatter guides.
  </Card>
</CardGroup>
