Logo Cometchat Flutter V6 Patterns

Cometchat Flutter V6 Patterns

Tổ chức
cometchat
cometchat-flutter-v6-patterns

Project wiring for the Flutter v6 UI Kit — navigation (Navigator / go_router / auto_route), state management (bloc / riverpod / provider / getx), config & secrets, platform setup, and web/desktop caveats. Triggers: 'cometchat with go_router', 'cometchat with riverpod', 'where do I put init in flutter', 'dart-define cometchat', 'cometchat flutter web'.

Tổng quan

Nhà phát hànhcometchat
Kho mãcometchat-skills
Tên kỹ năngcometchat-flutter-v6-patterns
Sao
109
Bản fork
2
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Đầy đủ trong hướng dẫn

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được cometchat công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Cometchat Flutter V6 Patterns trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-flutter-v6-patterns
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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-patterns .claude/skills/cometchat-flutter-v6-patterns
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Cometchat Flutter V6 Patterns trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Cometchat Flutter V6 Patterns ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Cometchat Flutter V6 Patterns không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Ground truth: the CometChat side is cometchat-flutter-v6-core; this skill only adds the DELTA for a given toolchain. Framework mechanics (go_router, riverpod, --dart-define) are baked Flutter knowledge, not kit API. Kit symbols come from the catalog.

Companion skills (read first)

  • cometchat-flutter-v6-core — install, credentials, the settings asset, init→login→render. This skill ASSUMES it.
  • cometchat-flutter-v6-placement — WHERE the surface goes; this skill is HOW it hooks into your app's plumbing.

Use this skill when

Wiring the kit into a specific project shape, or debugging "where does init go" / "the theme resets on navigation" / "my secrets are in git".

Prerequisites & install

Covered by core. No new package.

Navigation (BAKED — the delta per router)

The kit uses plain Navigator.push/pop internally and in every recipe, which works under all of these — you do not have to convert its recipes.

  • Plain Navigator — nothing to do. Core's recipes are already this.
  • go_router — register chat screens as routes and push with context.push('/chat/:uid'). The kit's own internal pops still work because go_router sits on the same Navigator. Put the init/login gate above the router (wrap MaterialApp.router's builder, or gate in redirect) so no chat route can build before login resolves.
  • auto_route — same principle: an AutoRouteGuard that waits for login is the idiomatic gate.
  • Calling adds one requirement: navigatorKey: CallNavigationContext.navigatorKey on MaterialApp (→ -calls). With go_router, pass the same key into the router config rather than creating a second one.

State management (BAKED)

The kit is self-contained — every widget drives its own BLoC internally. You do not wire the kit into your app's state layer, and you do not need flutter_bloc yourself.

  • bloc / cubit — expose the logged-in user from your auth cubit; gate chat routes on it. Do not try to own the kit's internal blocs.
  • riverpod — a FutureProvider that performs initFromSettings + login and which chat screens .when(...) on, is the cleanest gate.
  • provider / getx — same shape: one async init future, everything chat-related below it.
  • Reading kit state — CometChatUIKit.loggedInUser is the sync getter. For list state, use the widget's stateCallBack / onLoad, not a global store.

Config & secrets (BAKED — Flutter-specific)

initFromSettings reads a bundled asset, so it cannot read --dart-define. Two honest options; state the trade-off and let the user choose:

  1. Keep initFromSettings and generate cometchat-settings.json at build time from your existing secret source (CI writes the file). Keeps integrationSource="ai-agent" telemetry.
  2. Use the classic UIKitSettingsBuilder + CometChatUIKit.init(...) with --dart-define values. Works, but loses telemetry attribution.

Either way the Auth Key ends up in the app bundle and is dev-only — production means a server-minted auth token + loginWithAuthToken (core's lifecycle.md). Do NOT gitignore the registered cometchat-settings.json asset (a fresh clone / CI build then fails with "No file or variants found for asset") — commit a placeholder version (no real Auth Key) that dev/CI overwrite, and guard the real key with a pre-commit/CI check.

Platform setup (BAKED)

  • Android — minSdk = 26 in android/app/build.gradle.kts (the docs' 24 is too low); INTERNET permission; calling adds camera/mic.
  • iOS — platform :ios, '15.1' in the Podfile, then pod install; photo/camera/mic usage strings for attachments and calls. Both floors come from cometchat_calls_sdk, which the kit depends on unconditionally — they apply whether or not you use calling (DOCS-BACKLOG D7).
  • Web — the kit supports web, but plugin-backed features (media picker, calling) behave differently; verify anything you promise. flutter run -d chrome with the same settings asset.
  • Desktop — not a documented target; if asked, say so honestly rather than guessing.

Common pitfalls (BAKED)

  • Init inside a screen that can be re-entered (or inside a route builder) → repeated init. Gate ONCE at the root (lifecycle.md).
  • A chat route reachable before login resolves → blank screen. Guard the route, not just the widget.
  • Expecting initFromSettings to read --dart-define — it reads an asset. See above.
  • Adding flutter_bloc to "connect" the kit — unnecessary; the kit owns its blocs.
  • Two navigator keys when calling is on — the router and CallNavigationContext must share one.
  • cometchat-settings.json committed — the Auth Key is in your repo.
  • Forgetting WidgetsFlutterBinding.ensureInitialized() before an asset-reading init.

Verify it works

The app builds on each target platform you claim; chat routes are unreachable until login resolves; navigating away and back does not re-init; secrets are not in git; with calling on, an incoming call presents from any route.

Câu hỏi thường gặp

Kỹ năng AI Cometchat Flutter V6 Patterns làm được gì?

Project wiring for the Flutter v6 UI Kit — navigation (Navigator / go_router / auto_route), state management (bloc / riverpod / provider / getx), config & secrets, platform setup, and web/desktop caveats. Triggers: 'cometchat with go_router', 'cometchat with riverpod', 'where do I put init in flutter', 'dart-define cometchat', 'cometchat flutter web'.

Vì sao nên dùng Cometchat Flutter V6 Patterns trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Cometchat Flutter V6 Patterns là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Cometchat Flutter V6 Patterns trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-flutter-v6-patterns. TypingMind đọc tệp SKILL.md và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Cometchat Flutter V6 Patterns?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Cometchat Flutter V6 Patterns với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Cometchat Flutter V6 Patterns với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Cometchat Flutter V6 Patterns có miễn phí không?

Có. Kỹ năng này được cometchat phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇