cometchat-flutter-v5-theming — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited cometchat-flutter-v5-theming (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Ground truth:cometchat_chat_uikit: ^5.2(legacy/maintenance-only; calls via rawcometchat_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.
How to customize the visual appearance of all CometChat v5 components.
Three layers, resolved via Flutter's ThemeExtension system:
CometChatColorPalette — colors (primary, neutral, alert, background, text, icon, button, border)CometChatSpacing — spacing, padding, margin, and radius tokensCometChatTypography — text styles (heading1-4, body, caption1-2, button, link, title)Access via static helpers:
final colors = CometChatThemeHelper.getColorPalette(context);
final spacing = CometChatThemeHelper.getSpacing(context);
final typography = CometChatThemeHelper.getTypography(context);Important: getColorPalette() creates a new object every call, resolving each token via Theme.of(context). Cache in didChangeDependencies(), never call in build().
Register CometChatColorPalette as a ThemeExtension on your ThemeData:
// ✅ CORRECT
MaterialApp(
theme: ThemeData(
extensions: [
CometChatColorPalette(
primary: const Color(0xFF6852D6),
textPrimary: const Color(0xFF141414),
textSecondary: const Color(0xFF727272),
),
],
),
darkTheme: ThemeData(
extensions: [
CometChatColorPalette(
primary: const Color(0xFF604CC3),
textPrimary: const Color(0xFFFFFFFF),
textSecondary: const Color(0xFFA0A0A0),
),
],
),
)CometChatThemeMode.mode = ThemeMode.dark; // Force dark
CometChatThemeMode.mode = ThemeMode.system; // Follow system| Token | Description | Light Default | Dark Default |
|---|---|---|---|
primary | Brand color | #6852D6 | #604CC3 |
background1–4 | Surface backgrounds | neutral50→neutral300 | neutral50→neutral300 |
textPrimary | Main text | neutral900 | neutral900 |
textSecondary | Secondary text | neutral600 | neutral600 |
borderLight | Subtle borders | neutral200 | neutral200 |
iconPrimary | Main icons | neutral900 | neutral900 |
iconSecondary | Secondary icons | neutral500 | neutral500 |
iconHighlight | Highlighted icons | primary | primary |
error | Error states | #F44649 | #C73C3E |
white / black | Fixed (NOT brightness-aware) | Colors.white / Colors.black | Same |
transparent | Transparent | Colors.transparent | Same |
neutral600 | Used for date styles | — | — |
Extended primary shades (extendedPrimary50–900) are auto-generated from primary. Override individually if needed.
| Token | Default |
|---|---|
padding / spacing / radius | 2 |
padding1 / spacing1 / radius1 | 4 |
padding2 / spacing2 / radius2 | 8 |
padding3 / spacing3 / radius3 | 12 |
padding4 / spacing4 / radius4 | 16 |
padding5 / spacing5 / radius5 | 20 |
padding6 / spacing6 | 24 |
radiusMax / spacingMax | 1000 |
CometChatTypography provides: heading1–heading4, body, caption1, caption2, button, link, title.
Each has .bold, .medium, .regular variants:
typography.body?.regular?.fontSize
typography.heading2?.bold?.fontWeight
typography.caption1?.regular?.fontFamilyAll UIKit components cache theme unconditionally in didChangeDependencies():
// ✅ CORRECT — matches actual package pattern
@override
void didChangeDependencies() {
super.didChangeDependencies();
colorPalette = CometChatThemeHelper.getColorPalette(context);
spacing = CometChatThemeHelper.getSpacing(context);
typography = CometChatThemeHelper.getTypography(context);
}Do NOT use a _themeInitialized flag — it prevents theme updates on system theme changes.
Every component has a CometChat{Component}Style extending ThemeExtension. Resolved internally:
// Inside component's didChangeDependencies():
style = CometChatThemeHelper.getTheme<CometChatConversationsStyle>(
context: context,
defaultTheme: CometChatConversationsStyle.of,
).merge(widget.conversationsStyle);Pass overrides via constructor:
CometChatConversations(
conversationsStyle: CometChatConversationsStyle(
backgroundColor: Colors.black,
),
)colorPalette.white / black / transparent are NOT brightness-aware — use neutral50 for brightness-aware whiteprimary by blending with white (light) or black (dark)CometChatThemeHelper.getColorPalette(context), never hardcodeddidChangeDependencies(), not build()ThemeExtension on both theme and darkTheme~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.