跳到内容

AI 辅助集成

使用 AI 编码助手在您的项目中集成和配置 Pushwoosh Flutter 插件。通过将您的助手连接到 Context7 MCP 服务器,它可以访问最新的插件文档、代码示例和 API 参考——从而生成准确、可用的集成代码。

工作原理

Anchor link to

Context7 是一个 MCP 服务器,为 AI 助手提供最新的库文档。当您的助手可以访问 Context7 时,它可以在对话期间直接获取最新的 Pushwoosh Flutter 插件文档、代码片段和 API 参考——而不是依赖可能过时的训练数据。

Pushwoosh Flutter 插件在 Context7 上的库 ID 为:/pushwoosh/pushwoosh-flutter

设置 Context7

Anchor link to

Context7 添加到您的 AI 助手的 MCP 配置中:

运行以下命令:

Terminal window
claude mcp add context7 -- npx -y @anthropic-ai/context7-mcp@latest

示例提示

Anchor link to

配置好 Context7 后,您可以使用自然语言提示来集成插件。以下是用于常见任务的即用型提示。

基本插件集成

Anchor link to
Integrate Pushwoosh Flutter plugin into my Flutter project.
Requirements:
- Install pushwoosh_flutter via pub
- Initialize Pushwoosh with my App ID in main()
- Register for push notifications and handle onPushReceived and onPushAccepted streams
Use Context7 MCP to fetch Pushwoosh Flutter plugin documentation.

标签和用户分群

Anchor link to
Show me how to use Pushwoosh tags in a Flutter app for user segmentation.
I need to set tags, get tags, and set user ID for cross-device tracking.
Use Context7 MCP to fetch Pushwoosh Flutter plugin documentation for setTags and getTags.

消息收件箱集成

Anchor link to
Integrate Pushwoosh Message Inbox into my Flutter app. Show me how to:
- Display the inbox UI with custom styling using PWInboxStyle
- Load messages programmatically
- Track unread message count
Use Context7 MCP to fetch Pushwoosh Flutter plugin documentation for presentInboxUI.

AI 助手获取的内容

Anchor link to

当您的助手向 Context7 查询 Pushwoosh Flutter 插件时,它会收到:

  • 安装说明pubspec.yaml 设置和平台特定配置
  • API 参考 — 公共类、方法和流定义
  • 代码示例 — 常见用例的 Dart 代码片段
  • 插件文档 — 核心插件、Inbox 和 Geozones 的指南
  • 配置详情 — 初始化参数、iOS 和 Android 设置步骤