cometchat/cometchat-uikit-flutter/cometchat-flutter-theming
Claude Code and agent skill by cometchat/cometchat-uikit-flutter
- community
Checking that the SKILL.md file is still in the repository.
Use when customizing the visual appearance of CometChat Flutter UIKit v6 components. Triggers on mentions of CometChatThemeHelper, CometChatColorPalette, CometChatSpacing, CometChatTypography, CometChatThemeMode, dark mode, light mode, theme, colors, styling, custom theme, Style class, merge(), getColorPalette, getSpacing, getTypography, ThemeExtension, primary color, neutral colors, background colors, text colors, icon colors, button colors, border colors, or any CometChat{Component}Style class. Also use when the user asks about changing colors, fonts, spacing, or appearance of chat components.
Install
npx vskill@latest install cometchat/cometchat-uikit-flutter/cometchat-flutter-themingSKILL.md
The same SKILL.md was published earlier as cometchat/cometchat-uikit-flutter/cometchat-flutter-theming.
CometChat Flutter UIKit — Theming & Styling
How to customize the visual appearance of all CometChat components.
Theme System Architecture
Three layers, resolved via Flutter's ThemeExtension system:
CometChatColorPalette— all colors (primary, neutral, alert, background, text, icon, button, border)CometChatSpacing— spacing tokensCometChatTypography— text styles (heading1-4, body, caption1-2, button, link, title)
Access via static helpers:
Applying a Custom Theme
Register CometChatColorPalette as a ThemeExtension on your ThemeData:
Note: CometChatColorPalette does NOT have a const constructor (it has mutable default fields for white, black, transparent). Don't try const CometChatColorPalette(...) — it won't compile.
Dark Mode
CometChatThemeMode controls how brightness is resolved:
The helper reads brightness via:
Color Palette Tokens
| Category | Tokens | Default Source | |
|---|---|---|---|
| Primary | primary | #6852D6 light / #604CC3 dark | |
| Extended Primary | extendedPrimary50–900 | Auto-generated from primary via blend | |
| Neutral | neutral50–900 | 10-shade grayscale | |
| Alert | info, warning, error, success, error100 | Semantic colors | |
| Background | background1–4 | Mapped from neutral shades | |
| Text | textPrimary, textSecondary, textTertiary, textDisabled, textWhite, textHighlight | Mapped from neutral/primary | |
| Icon | iconPrimary, iconSecondary, iconTertiary, iconWhite, iconHighlight | Mapped from neutral/primary | |
| Button | buttonBackground, secondaryButtonBackground, buttonText, buttonIconColor, secondaryButtonText, secondaryButtonIcon | Primary + neutral | |
| Border | borderLight, borderDefault, borderDark, borderHighlight | Neutral shades + primary | |
| Special | white, black, messageSeen | Fixed values |
Component Style Classes
Every component has a CometChat{Component}Style class with a merge() method:
Style classes support merge() for combining defaults with overrides:
Theme Caching (Performance-Critical)
Cache theme in didChangeDependencies() — never in build():
For child widgets that receive theme from parent (hybrid pattern):
Gotchas
CometChatColorPaletteis NOT const-constructible. It has mutable default fields (white = Colors.white,black = Colors.black,transparent = Colors.transparent). Writingconst CometChatColorPalette(...)orconst [CometChatColorPalette()]won't compile.CometChatThemeHelper.getColorPalette(context)doesTheme.of(context).extension<CometChatColorPalette>()internally — this is an InheritedWidget lookup. Inbuild()during keyboard animation, this fires every frame causing 44-95ms build times.- Extended primary colors are auto-generated by blending
primarywith white (light) or black (dark). Override individual shades only if the auto-blend doesn't match your brand. CometChatThemeMode.modeis a static field — changing it doesn't trigger rebuilds. You need to also changeThemeDatabrightness or callsetStateon theMaterialApp.- Style
merge()is null-aware: only non-null fields from the override replace the base. This means you can't explicitly set a field tonullvia merge.
Anti-Patterns
Checklist
- [ ] Custom colors registered as
ThemeExtensiononThemeData - [ ] Both
themeanddarkThemeconfigured if supporting dark mode - [ ] Theme values cached in
didChangeDependencies(), notbuild() - [ ] No
CometChatThemeHelper.get*()calls in any method invoked duringbuild()(including helper methods like_buildProfileMenu()) - [ ]
_themeInitializedflag prevents re-init during keyboard animation - [ ] No hardcoded colors — all from
CometChatColorPalette - [ ]
MediaQuery.sizeOf(context)used instead ofMediaQuery.of(context).size - [ ] Style overrides use component's Style class, not inline styles
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cometchat-flutter-theming/SKILL.md
Popularity
- Repository stars
- 520
- Repository forks
- 42
- 7-day trend score
- 31
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cometchat/cometchat-uikit-flutter/cometchat-flutter-theming)