> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-feature-react-native-sdk-quotedmessage-a.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Groups

## Overview

`CometChatGroups` functions as a standalone [Widget](/ui-kit/flutter/components-overview#components) designed to create a screen displaying a list of groups, with the added functionality of enabling users to search for specific groups. Acting as a container widget, `CometChatGroups` encapsulates and formats the `CometChatListBase` and `CometChatGroupList` widgets without introducing any additional behavior of its own.

<Frame>
  <img src="https://mintcdn.com/cometchat-22654f5b-feature-react-native-sdk-quotedmessage-a/G5i-Yehfyg9oyBQO/images/e877cb7b-groups-dc2d2ca999ff476db4925ab838df28b9.png?fit=max&auto=format&n=G5i-Yehfyg9oyBQO&q=85&s=81bdf468810a4d7dc78121817d660008" width="2560" height="1600" data-path="images/e877cb7b-groups-dc2d2ca999ff476db4925ab838df28b9.png" />
</Frame>

The `CometChatGroups` widget is composed of the following BaseWidget:

| Widgets                                        | Description                                                                                                                                                                                |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [CometChatListBase](/ui-kit/flutter/list-base) | `CometChatListBase` serves as a container widget equipped with a title (navigationBar), search functionality (search-bar), background settings, and a container for embedding a list view. |
| [CometChatListItem](/ui-kit/flutter/list-item) | This widget renders information extracted from a `Group` object onto a tile, featuring a title, subtitle, leading view, and trailing view.                                                 |

## Usage

### Integration

As `CometChatGroups` is a custom **widget**, it can be launched directly by user actions such as button clicks or other interactions.

You can launch `CometChatGroups` directly using `Navigator.push`, or you can define it as a widget within the `build` method of your `State` class.

##### 1. Using Navigator to Launch `CometChatGroups`

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    Navigator.push(context, MaterialPageRoute(builder: (context) => const CometChatGroups()));
    ```
  </Tab>
</Tabs>

##### 2. Embedding `CometChatGroups` as a Widget in the build Method

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
    import 'package:flutter/material.dart';

    class Groups extends StatefulWidget {
      const Groups({super.key});

      @override
      State<Groups> createState() => _GroupsState();
    }

    class _GroupsState extends State<Groups> {

      @override
      Widget build(BuildContext context) {
        return const Scaffold(
            body: SafeArea(
                child: CometChatGroups()
            )
        );
      }
    }
    ```
  </Tab>
</Tabs>

***

### Actions

[Actions](/ui-kit/flutter/components-overview#actions) dictate how a widget functions. They are divided into two types: Predefined and User-defined. You can override either type, allowing you to tailor the behavior of the widget to fit your specific needs.

##### 1. onItemTap

This method proves valuable when users seek to override onItemTap functionality within CometChatGroups, empowering them with greater control and customization options.

The `onItemTap` action doesn't have a predefined behavior. You can override this action using the following code snippet.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
      onItemTap: (context, group) {
        // TODO("Not yet implemented")
      },
    )
    ```
  </Tab>
</Tabs>

***

##### 2. onBack

Enhance your application's functionality by leveraging the `onBack` feature. This capability allows you to customize the behavior associated with navigating back within your app. Utilize the provided code snippet to override default behaviors and tailor the user experience according to your specific requirements.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
      onBack: () {
        // TODO("Not yet implemented")
      },
    )
    ```
  </Tab>
</Tabs>

***

##### 3. onError

You can customize this behavior by using the provided code snippet to override the `onError` and improve error handling.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
      onError: (e) {
        // TODO("Not yet implemented")
      },
    )
    ```
  </Tab>
</Tabs>

***

##### 4. onItemLongPress

This method becomes invaluable when users seek to override long-click functionality within CometChatGroups, offering them enhanced control and flexibility in their interactions.

The `onItemLongPress` action doesn't have a predefined behavior. You can override this action using the following code snippet.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
      onItemLongPress: (context, group) {
        // TODO("Not yet implemented")
      },
    )
    ```
  </Tab>
</Tabs>

***

##### 5. onSelection

When the `onSelection` event is triggered, it furnishes the list of selected groups. This event can be invoked by any button or action within the interface. You have the flexibility to implement custom actions or behaviors based on the selected groups.

This action does not come with any predefined behavior. However, you have the flexibility to override this event and tailor it to suit your needs using the following code snippet.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
      selectionMode: SelectionMode.multiple,
      activateSelection: ActivateSelection.onClick,
      onSelection: (groupList) {
        // TODO("Not yet implemented")
      }
    )
    ```
  </Tab>
</Tabs>

***

##### onLoad

Invoked when the list is successfully fetched and loaded, helping track component readiness.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
         onLoad: (list) {
              // print("Groups loaded: ${list.length}");
            },
    )
    ```
  </Tab>
</Tabs>

***

##### onEmpty

Called when the list is empty, enabling custom handling such as showing a placeholder message.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
          onEmpty: () {
              // print("Groups empty");
            },
    )
    ```
  </Tab>
</Tabs>

***

### Filters

**Filters** allow you to customize the data displayed in a list within a Component. You can filter the list based on your specific criteria, allowing for a more customized. Filters can be applied using RequestBuilders of Chat SDK.

##### 1. GroupsRequestBuilder

The [GroupsRequestBuilder](/sdk/flutter/retrieve-groups) enables you to filter and customize the group list based on available parameters in GroupsRequestBuilder. This feature allows you to create more specific and targeted queries when fetching groups. The following are the parameters available in [GroupsRequestBuilder](/sdk/flutter/retrieve-groups)

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
        groupsRequestBuilder: GroupsRequestBuilder()
            ..limit = 10
    )
    ```
  </Tab>
</Tabs>

| Property           | Description                                               | Code                    |
| ------------------ | --------------------------------------------------------- | ----------------------- |
| **Joined Only**    | Flag to include only joined groups. Defaults to `false`.  | `joinedOnly: bool`      |
| **Limit**          | Number of results to limit the query.                     | `limit: int`            |
| **Search Keyword** | Keyword for searching groups.                             | `searchKeyword: String` |
| **Tags**           | Tags for filtering groups.                                | `tags: List<String>`    |
| **With Tags**      | Flag to include tags in the results. Defaults to `false`. | `withTags: bool`        |

***

### Events

[Events](/ui-kit/flutter/components-overview#events) are emitted by a `CometChatGroups` Widget. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed.

The list of events emitted by the `CometChatGroups` widget is as follows.

| Events                      | Description                                                                                              |
| --------------------------- | -------------------------------------------------------------------------------------------------------- |
| `ccGroupCreated`            | This gets triggered when the logged in user creates a group.                                             |
| `ccGroupDeleted`            | This gets triggered when the logged in user deletes a group.                                             |
| `ccGroupLeft`               | This gets triggered when the logged in user leaves a group.                                              |
| `ccGroupMemberScopeChanged` | This gets triggered when the logged in user changes the scope of another group member.                   |
| `ccGroupMemberBanned`       | This gets triggered when the logged in user bans a group member from the group.                          |
| `ccGroupMemberKicked`       | This gets triggered when the logged in user kicks another group member from the group.                   |
| `ccGroupMemberUnbanned`     | This gets triggered when the logged in user unbans a user banned from the group.                         |
| `ccGroupMemberJoined`       | This gets triggered when the logged in user joins a group.                                               |
| `ccGroupMemberAdded`        | This gets triggered when the logged in user adds new members to the group.                               |
| `ccOwnershipChanged`        | This gets triggered when the logged in user transfers the ownership of their group to some other member. |

<Tabs>
  <Tab title="Dart">
    ```dart your_screen.dart theme={null}
    import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
    import 'package:cometchat_sdk/models/action.dart' as cc;
    import 'package:flutter/material.dart';

    class YourScreen extends StatefulWidget {
      const YourScreen({super.key});

      @override
      State<YourScreen> createState() => _YourScreenState();
    }

    class _YourScreenState extends State<YourScreen> with CometChatGroupEventListener {

      @override
      void initState() {
        super.initState();
        CometChatGroupEvents.addGroupsListener("listenerId", this); // Add the listener
      }

      @override
      void dispose(){
        super.dispose();
        CometChatGroupEvents.removeGroupsListener("listenerId"); // Remove the listener
      }


      @override
      void ccGroupCreated(Group group) {
        // TODO("Not yet implemented")
      }

      @override
      void ccGroupDeleted(Group group) {
        // TODO("Not yet implemented")
      }

      @override
      void ccGroupLeft(cc.Action message, User leftUser, Group leftGroup) {
        // TODO("Not yet implemented")
      }

      @override
      void ccGroupMemberScopeChanged(cc.Action message, User updatedUser, String scopeChangedTo, String scopeChangedFrom, Group group) {
        // TODO("Not yet implemented")
      }

      @override
      void ccGroupMemberBanned(cc.Action message, User bannedUser, User bannedBy, Group bannedFrom) {
        // TODO("Not yet implemented")
      }

      @override
      void ccGroupMemberKicked(cc.Action message, User kickedUser, User kickedBy, Group kickedFrom) {
        // TODO("Not yet implemented")
      }

      @override
      void ccGroupMemberUnbanned(cc.Action message, User unbannedUser, User unbannedBy, Group unbannedFrom) {
        // TODO("Not yet implemented")
      }

      @override
      void ccGroupMemberJoined(User joinedUser, Group joinedGroup) {
        // TODO("Not yet implemented")
      }

      @override
      void ccGroupMemberAdded(List<cc.Action> messages, List<User> usersAdded, Group groupAddedIn, User addedBy) {
        // TODO("Not yet implemented")
      }

      @override
      void ccOwnershipChanged(Group group, GroupMember newOwner) {
        // TODO("Not yet implemented")
      }

      @override
      Widget build(BuildContext context) {
        return const Placeholder();
      }

    }
    ```
  </Tab>
</Tabs>

***

## Customization

To fit your app's design requirements, you can customize the appearance of the groups widget. We provide exposed methods that allow you to modify the experience and behavior according to your specific needs.

### Style

Enhance your `CometChatGroups` Widget by setting the `CometChatGroupsStyle` to customize its appearance.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
      groupsStyle: CometChatGroupsStyle(
        avatarStyle: CometChatAvatarStyle(
            borderRadius: BorderRadius.circular(8),
            backgroundColor: Color(0xFFFBAA75),
        ),
        titleTextColor: Color(0xFFF76808),
        separatorColor: Color(0xFFF76808),
      ),
    )
    ```
  </Tab>
</Tabs>

<Frame>
  <img src="https://mintcdn.com/cometchat-22654f5b-feature-react-native-sdk-quotedmessage-a/195oxTVcmj5zqz-a/images/c43fe4f4-groups_styling-107ad9e9a3daa796d657515d719c04f6.png?fit=max&auto=format&n=195oxTVcmj5zqz-a&q=85&s=e2fff0ca4be2a32d50c051464dc642ca" width="2560" height="1600" data-path="images/c43fe4f4-groups_styling-107ad9e9a3daa796d657515d719c04f6.png" />
</Frame>

***

### Functionality

These are a set of small functional customizations that allow you to fine-tune the overall experience of the widget. With these, you can change text, set custom icons, and toggle the visibility of UI elements.

<Frame>
  <img src="https://mintcdn.com/cometchat-22654f5b-feature-react-native-sdk-quotedmessage-a/G5i-Yehfyg9oyBQO/images/e877cb7b-groups-dc2d2ca999ff476db4925ab838df28b9.png?fit=max&auto=format&n=G5i-Yehfyg9oyBQO&q=85&s=81bdf468810a4d7dc78121817d660008" width="2560" height="1600" data-path="images/e877cb7b-groups-dc2d2ca999ff476db4925ab838df28b9.png" />
</Frame>

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
      title: "Your Title",
      backButton: Icon(Icons.add_alert, color: Color(0xFF6851D6)),
      searchPlaceholder: "Search Group",
    )
    ```
  </Tab>
</Tabs>

## List of properties exposed by `CometChatGroups`

| Property               | Data Type                                                                          | Description                                         |
| ---------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------- |
| `groupsProtocol`       | `GroupsBuilderProtocol?`                                                           | Custom groups request builder protocol.             |
| `groupsRequestBuilder` | `GroupsRequestBuilder?`                                                            | Custom request builder for fetching groups.         |
| `subtitleView`         | `Widget? Function(BuildContext, Group)?`                                           | Widget to set subtitle for each group item.         |
| `listItemView`         | `Widget Function(Group)?`                                                          | Custom view for each group item.                    |
| `groupsStyle`          | `CometChatGroupsStyle?`                                                            | Styling options for the groups list.                |
| `scrollController`     | `ScrollController?`                                                                | Controller for scrolling the list.                  |
| `searchPlaceholder`    | `String?`                                                                          | Placeholder text for the search input box.          |
| `backButton`           | `Widget?`                                                                          | Widget for the back button in the app bar.          |
| `showBackButton`       | `bool`                                                                             | Flag to show/hide the back button.                  |
| `searchBoxIcon`        | `Widget?`                                                                          | Widget for the search box icon.                     |
| `hideSearch`           | `bool`                                                                             | Flag to show/hide the search input box.             |
| `selectionMode`        | `SelectionMode?`                                                                   | Mode defining how groups can be selected.           |
| `onSelection`          | `Function(List<Group>?)?`                                                          | Callback for handling group selection.              |
| `title`                | `String?`                                                                          | Title of the widget.                                |
| `stateCallBack`        | `Function(CometChatGroupsController)?`                                             | Callback to access controller functions.            |
| `hideError`            | `bool?`                                                                            | Toggle visibility of error dialog.                  |
| `loadingStateView`     | `WidgetBuilder?`                                                                   | View displayed during loading state.                |
| `emptyStateView`       | `WidgetBuilder?`                                                                   | View displayed when the list is empty.              |
| `errorStateView`       | `WidgetBuilder?`                                                                   | View displayed when an error occurs.                |
| `appBarOptions`        | `List<Widget> Function(BuildContext)?`                                             | Options available in the app bar.                   |
| `passwordGroupIcon`    | `Widget?`                                                                          | Widget for password-protected group icon.           |
| `privateGroupIcon`     | `Widget?`                                                                          | Widget for private group icon.                      |
| `activateSelection`    | `ActivateSelection?`                                                               | Controls whether selection is allowed.              |
| `onBack`               | `VoidCallback?`                                                                    | Callback triggered when going back.                 |
| `onItemTap`            | `Function(BuildContext, Group)?`                                                   | Callback triggered when tapping a group.            |
| `onItemLongPress`      | `Function(BuildContext, Group)?`                                                   | Callback triggered on long press of a group.        |
| `onError`              | `OnError?`                                                                         | Callback for handling errors.                       |
| `submitIcon`           | `Widget?`                                                                          | Widget for displaying the submit icon.              |
| `hideAppbar`           | `bool`                                                                             | Flag to show/hide the app bar.                      |
| `controllerTag`        | `String?`                                                                          | Identifier tag for controller management.           |
| `height`               | `double?`                                                                          | Height of the widget.                               |
| `width`                | `double?`                                                                          | Width of the widget.                                |
| `searchKeyword`        | `String?`                                                                          | Keyword used to fetch initial group list.           |
| `onLoad`               | `OnLoad<Group>?`                                                                   | Callback triggered when the list loads.             |
| `onEmpty`              | `OnEmpty?`                                                                         | Callback triggered when the list is empty.          |
| `groupTypeVisibility`  | `bool`                                                                             | Hide the group type icon visible on the group icon. |
| `setOptions`           | `List<CometChatOption>? Function(Group, CometChatGroupsController, BuildContext)?` | Actions available on long-press of a group.         |
| `addOptions`           | `List<CometChatOption>? Function(Group, CometChatGroupsController, BuildContext)?` | Additional long-press actions for groups.           |
| `titleView`            | `Widget? Function(BuildContext, Group)?`                                           | Custom title view for each group.                   |
| `leadingView`          | `Widget? Function(BuildContext, Group)?`                                           | Widget for the leading section of each group.       |
| `trailingView`         | `Widget? Function(BuildContext, Group)?`                                           | Widget for the trailing section of each group.      |

***

### Advance

For advanced-level customization, you can set custom views to the widget. This lets you tailor each aspect of the widget to fit your exact needs and application aesthetics. You can create and define your own widget and then incorporate those into the widget.

***

#### setOptions

This method sets a predefined list of actions that users can perform when they long press a user in the list. These options typically include:

* Enable actions like "Mute Notifications", "Leave Group", "Pin Group".
* Provide admin-only actions like "Manage Members", "Delete Group".

By customizing these options, developers can provide a streamlined and contextually relevant user experience

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
      setOptions: (group, controller, context) {
        // return options
      },
    )
    ```
  </Tab>
</Tabs>

***

#### addOptions

This method extends the existing set of actions available when users long press a group item. Unlike setOptionsDefines, which replaces the default options, addOptionsAdds allows developers to append additional actions without removing the default ones. Example use cases include:

* Adding a "Report Spam" action
* Introducing a "Save to Notes" option
* Integrating third-party actions such as "Share to Cloud Storage"

This method provides flexibility in modifying user interaction capabilities.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
      addOptions: (group, controller, context) {
        // return options
      },
    )
    ```
  </Tab>
</Tabs>

***

#### loadingStateView

Configures a custom loading view displayed while groups are being fetched.

* Show a spinner with "Loading groups..." text.
* Display a skeleton loader for a smooth UI experience.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
        loadingStateView: (context) {
          // return loading view
      },
    )
    ```
  </Tab>
</Tabs>

***

#### emptyStateView

Defines a view that appears when no groups are available.

* Show a message like "No groups found, create one now!".
* Display an illustration with a "Create New Group" button.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
        emptyStateView: (context) {
          // return empty view
      },
    )
    ```
  </Tab>
</Tabs>

***

#### errorStateView

Configures the UI when an error occurs while fetching groups.

* Display a retry button with "Failed to load groups, try again.".
* Show a friendly error illustration.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
        errorStateView: (context) {
          // return error view
      },
    )
    ```
  </Tab>
</Tabs>

***

#### leadingView

Sets a custom leading view that appears at the start of each group item.

* Display the group profile picture.
* Add an icon indicating Public or Private groups.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
        leadingView: (context, group) {
           // return leading view
        },
    )
    ```
  </Tab>
</Tabs>

***

#### titleView

Customizes the title view of each group item, which typically displays the group name.

* Style group names with custom fonts and colors.
* Show a verified badge for official groups.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
        titleView: (context, group) {
          // return title view
        },
    )
    ```
  </Tab>
</Tabs>

***

#### trailingView

Allows custom elements to be added at the end of each group item, such as buttons or indicators.

* Show unread message counts.
* Add a quick Join or Leave button.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
        trailingView: (context, group) {
          // return trailing view
        },
    )
    ```
  </Tab>
</Tabs>

***

#### ListItemView

With this function, you can assign a custom ListItem to the `CometChatGroups` Widget.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
      listItemView: (group) {
        return Placeholder(); // Replace this placeholder with your custom widget.
      },
    )
    ```
  </Tab>
</Tabs>

**Example**

Here is the complete example for reference:

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
      CometChatGroups(
        listItemView: (group) {
          return ListTile(
            title: Text(
              group.name,
              style: TextStyle(
                fontSize: 16,
                fontWeight: FontWeight.w500,
              ),
            ),
            subtitle: Text(
              "${group.membersCount} Members • ${group.description}",
              overflow: TextOverflow.ellipsis,
              style: TextStyle(
                fontSize: 14,
                fontWeight: FontWeight.w400,
                color: Color(0XFF727272),
              ),
            ),
            trailing: ElevatedButton(
                onPressed: () {
                  CometChat.joinGroup(
                    group.guid,
                    group.type,
                    onSuccess: (group) {
                      //handle success, for example, show a toast or navigate to a new screen
                    },
                    onError: (excep) {
                      //handle exception, for example, show an error toast or dialog
                    },
                  );
                },
                child: Text(
                  "JOIN",
                  style: TextStyle(
                      color: Color(0xFF6852D6),
                      fontSize: 12,
                      fontWeight: FontWeight.w500,
                      letterSpacing: 0),
                ),
                style: ElevatedButton.styleFrom(
                  backgroundColor: Color(0xFFEDEAFA),
                  elevation: 0,
                  padding: EdgeInsets.symmetric(horizontal: 12, vertical: 4),
                  visualDensity: VisualDensity.compact,
                  shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(1000),
                  ),
                )),
          );
        },
      );
    ```
  </Tab>
</Tabs>

<Frame>
  <img src="https://mintcdn.com/cometchat-22654f5b-feature-react-native-sdk-quotedmessage-a/c-F07JuWM49qOkUs/images/c104cd7e-groups_list_item_view-109ac7b59329b7d6d9955dfddf3d1118.png?fit=max&auto=format&n=c-F07JuWM49qOkUs&q=85&s=cf4fb014e8aa4578c344e7ab8e87b2f3" width="2560" height="1600" data-path="images/c104cd7e-groups_list_item_view-109ac7b59329b7d6d9955dfddf3d1118.png" />
</Frame>

***

#### SubtitleView

You can customize the subtitle view for each item to meet your specific preferences and needs.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
      subtitleView: (context, group) {
         return Text(
        "${group.membersCount} Members • ${group.description}",
        overflow: TextOverflow.ellipsis,
        style: TextStyle(
          fontSize: 14,
          fontWeight: FontWeight.w400,
          color: Color(0XFF727272),
        ),
      );
      },
    )
    ```
  </Tab>
</Tabs>

<Frame>
  <img src="https://mintcdn.com/cometchat-22654f5b-feature-react-native-sdk-quotedmessage-a/V0K7cPlfehMN11ku/images/2d0c6f2a-groups_subtitle_view-3323448a083aa72548b47bfed9a0a38c.png?fit=max&auto=format&n=V0K7cPlfehMN11ku&q=85&s=5365caa6f4bb63ea21f8fe6bb75eaee5" width="2560" height="1600" data-path="images/2d0c6f2a-groups_subtitle_view-3323448a083aa72548b47bfed9a0a38c.png" />
</Frame>

***

#### AppBarOptions

You can set the Custom `appBarOptions` to the `CometChatGroups` widget.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatGroups(
      appBarOptions: (context) {
        return [
          IconButton(
                onPressed: () {},
                icon: Icon(
                      Icons.group_add,
                      color: Color(0xFF6852D6),
                ),
            ),
        ];
      },
    )
    ```
  </Tab>
</Tabs>

<Frame>
  <img src="https://mintcdn.com/cometchat-22654f5b-feature-react-native-sdk-quotedmessage-a/c-F07JuWM49qOkUs/images/c09acf2a-groups_menu-752a7d65222cd6df7f596f12dc3ea67f.png?fit=max&auto=format&n=c-F07JuWM49qOkUs&q=85&s=98e4d301c281eabc1f9f479e7cb0dfb6" width="2560" height="1600" data-path="images/c09acf2a-groups_menu-752a7d65222cd6df7f596f12dc3ea67f.png" />
</Frame>

***
