Skip to main content
Learn how to create groups, join public/password groups, manage members, ban users, update roles, and transfer group ownership using CometChat UIKit for Flutter.

Overview

Enable your users to:
  • Create or join public/private/password-protected groups
  • View and manage group members
  • Assign roles and moderate participants
  • Transfer group ownership for continuity

Prerequisites

  • CometChat UIKit for Flutter installed via pubspec.yaml
  • CometChat initialized with App ID, Region, and Auth Key
  • Group chat enabled in your CometChat app
  • Navigation set up between group/member screens
  • Internet permissions

Components

Integration Steps

Create a Group

📄 dashboard.dart

Join Public/Password Group

📄 join_protected_group_util.dart

View Members

📄 group_info/cometchat_group_info.dart

Add Members

📄 add_members/cometchat_add_members.dart

Ban/Unban Members

📄 banned_members/cometchat_banned_members.dart

Change Member Scope

📄 group_info/cometchat_group_info_controller.dart

Transfer Ownership

📄 transfer_ownership/cometchat_transfer_ownership.dart

Implementation Flow

  1. User creates or joins a group
  2. Admin views group info and member list
  3. Admin can add, ban, change scope, or transfer ownership

Customization Options

  • Modify theme using CometChat UIKit theming APIs
  • Add logic to validate group name or enforce limits
  • Adjust member filters or role options as needed

Filtering / Edge Cases

  • Filter by roles or banned status
  • Prevent duplicate group IDs
  • Prevent banning owner or transferring to non-member

Error Handling & Blocked Users

  • Show UI feedback (SnackBars) on failure
  • Blocked users cannot be added or may be auto-banned
  • Retry logic for failed actions (create, join, etc.)

Group Type Notes

  • Public: anyone can join
  • Password: prompt required
  • Private: invite-only
  • Only admins can ban, change roles, or transfer ownership

Summary / Feature Matrix

Next Steps & Further Reading

Flutter Sample App

Explore the working implementation in our official sample app.View on GitHub

Flutter UIKit Source

Get the full UI Kit source for deeper customization.View on GitHub