Cometchat Flutter V6 Events logo

Cometchat Flutter V6 Events

Organization
cometchat
cometchat-flutter-v6-events

React to CometChat activity in a Flutter app — SDK listeners (messages, calls, users, groups, connection) versus UI Kit events (CometChatMessageEvents, CometChatGroupEvents, CometChatUserEvents, CometChatConversationEvents), and the listener lifecycle that keeps them from leaking. Triggers: 'listen for new messages', 'react when a message is sent', 'cometchat listener flutter', 'unread badge count', 'onMessageReceived'.

Overview

Publishercometchat
Repositorycometchat-skills
Skill namecometchat-flutter-v6-events
Stars
109
Forks
2
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by cometchat on GitHub. Read the source before you install it.

Installation

Install the Cometchat Flutter V6 Events AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cometchat/cometchat-skills.git /tmp/cometchat-skills
mkdir -p .claude/skills
cp -r /tmp/cometchat-skills/skills/cometchat-flutter-v6-events .claude/skills/cometchat-flutter-v6-events
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cometchat Flutter V6 Events in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cometchat Flutter V6 Events on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cometchat Flutter V6 Events is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Ground truth: every listener symbol below is catalog-verified against 6.1.0. There are TWO event systems and they are not interchangeable — the exact callback set for each is FETCHED from events (UI events) and the SDK's real-time-listeners via ../cometchat-flutter-v6-core/references/docs-map.md.

Companion skills (read first)

  • cometchat-flutter-v6-core — install, credentials, init→login→render. This skill ASSUMES it.

Use this skill when

"do something when a message arrives", "update a badge count", "refresh my screen when a group changes", "cometchat listener" — anything reactive OUTSIDE what the kit's widgets already do for themselves.

Prerequisites & install

Covered by core. No new package.

First: do you actually need a listener?

The kit's widgets are already live. CometChatConversations updates its own unread counts, CometChatMessageList appends incoming messages, CometChatMessageHeader shows typing and presence — all without a single listener from you. Add one only for something OUTSIDE the kit's surface: an app-level badge, an analytics hook, a push registration, navigating on an incoming call.

Adding a listener to "make the list update" is the most common mistake here — it already does.

The two systems (BAKED)

SDK listenersUI Kit events
Sourcethe server, via CometChat.*the kit's own widgets
RegisterCometChat.addMessageListener(id, this)CometChatMessageEvents.addMessagesListener(id, this)
MixinMessageListener · CallListener · UserListener · GroupListener · ConnectionListenerCometChatMessageEventListener · CometChatGroupEventListener · CometChatUserEventListener · CometChatConversationEventListener
Answers"the server says X happened""the user did X in the kit"
Use forbadges, push, incoming calls, analyticsreacting to a kit action (message sent from the composer, group left via the kit)

SDK listener — server-side truth:

dart
import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
import 'package:flutter/material.dart';

class BadgeHost extends StatefulWidget {
  const BadgeHost({super.key});
  
  State<BadgeHost> createState() => _BadgeHostState();
}

class _BadgeHostState extends State<BadgeHost> with MessageListener {
  static const _id = "app_badge";

  
  void initState() {
    super.initState();
    CometChat.addMessageListener(_id, this);
  }

  
  void dispose() {
    CometChat.removeMessageListener(_id);   // ALWAYS remove — see lifecycle below
    super.dispose();
  }

  
  void onTextMessageReceived(TextMessage message) {
    // bump an app-level unread badge
  }

  
  Widget build(BuildContext context) => const SizedBox.shrink();
}

UI Kit event — react to what the kit did:

dart
import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
import 'package:flutter/material.dart';

class ComposerWatcher extends StatefulWidget {
  const ComposerWatcher({super.key});
  
  State<ComposerWatcher> createState() => _ComposerWatcherState();
}

class _ComposerWatcherState extends State<ComposerWatcher> with CometChatMessageEventListener {
  static const _id = "composer_watch";

  
  void initState() {
    super.initState();
    CometChatMessageEvents.addMessagesListener(_id, this);
  }

  
  void dispose() {
    CometChatMessageEvents.removeMessagesListener(_id);
    super.dispose();
  }

  
  Widget build(BuildContext context) => const SizedBox.shrink();
}

The listener lifecycle (the rule that prevents 90% of event bugs)

  1. Register in initState, remove in dispose — always paired.
  2. A unique, stable listener id per screen. Reusing one id across screens means the later registration silently replaces the earlier.
  3. Removing matters more than you think in Flutter: hot restart and route re-entry both re-run initState. A listener you never removed fires again, so a badge double-counts and a call dialog opens twice.
  4. Register AFTER login. A listener added before login resolves receives nothing.

Do NOT mix both message listeners on one class (compile trap — verified vs 6.1.0)

MessageListener (SDK) and CometChatMessageEventListener (UI Kit) both declare onCardMessageReceived, but with two different CardMessage types — one from cometchat_sdk, one from the kit. Mixing them on the same State fails to compile with invalid_override. Use two separate classes (or two States) when you need both.

Common pitfalls (BAKED)

  • Adding a listener to make a kit widget update — it already updates itself.
  • No dispose removal → duplicate events after hot restart / re-entry.
  • A shared listener id → one screen silently unregisters another.
  • Both message mixins on one class → does not compile (above).
  • Registering before login → silence.
  • Expecting UI events for server activity (or vice-versa) — pick the right system from the table.
  • v5 event APIs — the v5 DataSource/ChatConfigurator event plumbing is gone (→ -migration).

Verify it works

The reaction fires once (not twice) per event; hot-restart the app and confirm it still fires exactly once; navigate away and back and confirm no duplicate; with the app backgrounded, server-side events still arrive when it returns.

Frequently asked questions

What does the Cometchat Flutter V6 Events AI skill do?

React to CometChat activity in a Flutter app — SDK listeners (messages, calls, users, groups, connection) versus UI Kit events (CometChatMessageEvents, CometChatGroupEvents, CometChatUserEvents, CometChatConversationEvents), and the listener lifecycle that keeps them from leaking. Triggers: 'listen for new messages', 'react when a message is sent', 'cometchat listener flutter', 'unread badge count', 'onMessageReceived'.

Why use Cometchat Flutter V6 Events on TypingMind?

Because you install it once and use it with any model. Cometchat Flutter V6 Events is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cometchat Flutter V6 Events in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-flutter-v6-events. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Cometchat Flutter V6 Events?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cometchat Flutter V6 Events?

As many as you like. As long as a model supports skills, you can use Cometchat Flutter V6 Events with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cometchat Flutter V6 Events AI skill free?

Yes. It is published on GitHub by cometchat under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇