agentsclimarketplace

Cometchat flutter v5 users groups

Skill cometchat/cometchat-skills/skills/cometchat-flutter-v5-users-groups

Use when working with CometChat Flutter UIKit v5 user and group list components. Triggers on CometChatUsers, CometChatGroups, CometChatGroupMembers, CometChatChangeScope.From its SKILL.md

Install
npx -y skills add cometchat/cometchat-skills --skill cometchat-flutter-v5-users-groups

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

5.7 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it

Ground truth: cometchat_chat_uikit: ^5.2 (legacy/maintenance-only; calls via raw cometchat_calls_sdk ^5.0.2) — pub-cache source + ui-kit/flutter/v5. Official docs: https://www.cometchat.com/docs/ui-kit/flutter/v5/overview · Docs MCP: claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp (or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.

CometChat Flutter UIKit v5 — Users & Groups

Components for displaying and managing users, groups, and group members.

CometChatUsers

Displays a list of users, sorted alphabetically.

Key Props

PropTypeDefaultDescription
usersRequestBuilderUsersRequestBuilder?—Custom fetch builder
usersStyleCometChatUsersStyleconst CometChatUsersStyle()Visual styling
onItemTapFunction(BuildContext, User)?—Tap callback (includes BuildContext)
onItemLongPressFunction(BuildContext, User)?—Long press callback
subtitleViewWidget? Function(BuildContext, User)?—Custom subtitle
titleString?—List title
showBackButtonbooltrueShow back button
hideSearchboolfalseHide search bar
selectionModeSelectionMode?—Enable selection mode
onSelectionFunction(List<User>?, BuildContext)?—Selection callback
usersStatusVisibilitybool?trueShow online status
hideAppbarbool?falseHide app bar
appBarOptionsList<Widget> Function(BuildContext)?—App bar trailing widgets
controllerTagString?—Custom GetX controller tag
stickyHeaderVisibilitybool?falseShow alphabetical headers

Usage

CometChatUsers(
  onItemTap: (context, user) {
    Navigator.push(context, MaterialPageRoute(
      builder: (_) => MessagesScreen(user: user),
    ));
  },
)

// With custom request builder
CometChatUsers(
  usersRequestBuilder: UsersRequestBuilder()
    ..limit = 30
    ..friendsOnly = true,
)

// Filter by role (e.g., AI agents)
CometChatUsers(
  title: "Agents",
  usersRequestBuilder: UsersRequestBuilder()
    ..roles = [AIConstants.aiRole],
  onItemTap: (context, user) { ... },
)

CometChatGroups

Displays a list of groups with type indicators.

Key Props

PropTypeDefaultDescription
groupsRequestBuilderGroupsRequestBuilder?—Custom fetch builder
groupsStyleCometChatGroupsStyle?—Visual styling
onItemTapFunction(BuildContext, Group)?—Tap callback (includes BuildContext)
onItemLongPressFunction(BuildContext, Group)?—Long press callback
subtitleViewWidget? Function(BuildContext, Group)?—Custom subtitle
titleString?—List title
showBackButtonbooltrueShow back button
hideSearchboolfalseHide search bar
selectionModeSelectionMode?—Enable selection mode
groupTypeVisibilitybooltrueShow group type icon
hideAppbarbool?falseHide app bar
appBarOptionsList<Widget> Function(BuildContext)?—App bar trailing widgets
controllerTagString?—Custom GetX controller tag

Usage

CometChatGroups(
  onItemTap: (context, group) {
    Navigator.push(context, MaterialPageRoute(
      builder: (_) => MessagesScreen(group: group),
    ));
  },
)

CometChatGroupMembers

Displays members of a specific group with role indicators.

CometChatGroupMembers(
  group: group,
  onItemTap: (member) {
    debugPrint('Tapped: ${member.name}, role: ${member.scope}');
  },
)

Key props: group (required), groupMembersRequestBuilder, style (CometChatGroupMembersStyle? — prop name is style, NOT groupMembersStyle; verified cometchat_group_members.dart:25/88), subtitleView, trailingView, onItemTap (Function(GroupMember)? — no BuildContext), selectionMode, onSelection (Function(List<GroupMember>?)? — no BuildContext).

CometChatChangeScope

Widget for changing a group member's scope/role.

CometChatChangeScope(group: group, member: member)

Callback Signature Differences

ComponentonItemTap signature
CometChatConversationsFunction(Conversation)? — no BuildContext
CometChatUsersFunction(BuildContext, User)? — has BuildContext
CometChatGroupsFunction(BuildContext, Group)? — has BuildContext
CometChatGroupMembersFunction(GroupMember)? — no BuildContext

This is a common source of confusion.

Anti-Patterns

// ❌ WRONG — missing BuildContext in Users/Groups onItemTap
CometChatUsers(onItemTap: (user) { ... }) // Missing BuildContext!

// ✅ CORRECT
CometChatUsers(onItemTap: (context, user) { ... })
CometChatGroups(onItemTap: (context, group) { ... })

Checklist — Users & Groups

  • onItemTap callback signature includes BuildContext for Users/Groups
  • Custom request builders set appropriate limits
  • Let widgets manage their own GetX controller lifecycle

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.