aiagent_ohos 0.0.1 copy "aiagent_ohos: ^0.0.1" to clipboard
aiagent_ohos: ^0.0.1 copied to clipboard

HarmonyOS 小艺智能体 Flutter 插件,通过 PlatformView 嵌入原生 FunctionComponent,在 Flutter 应用中一键唤起智能体对话。仅支持 Flutter OHOS 平台。

Changelog #

本文档记录 aiagent_ohos 的版本变更,格式遵循 Keep a Changelog

0.0.1 - 2026-02-10 #

新增 (Added) #

  • AiAgentView:Flutter 组件,通过 PlatformView 嵌入 HarmonyOS 原生 AI Agent(FunctionComponent)按钮
  • AiAgentOptions:智能体配置类,支持 agentIdtitlequeryTextisShowShadowtitleColors
  • AiagentOhos 工具类:
    • getPlatformVersion():获取平台版本信息
    • isAgentSupport(agentId):检查指定智能体在当前环境是否可用
  • 智能体对话框生命周期回调:onAgentDialogOpenedonAgentDialogClosed
  • 错误回调:onError,便于处理参数错误、网络异常等
  • 原生层实现 AbilityAware,使用 UIAbilityContext 正确调用 isAgentSupport
  • 示例工程(example):演示可用性检查、基础用法与自定义配置

技术说明 #

  • 仅支持 HarmonyOS 平台(Flutter OHOS)
  • 依赖 @kit.AgentFrameworkKit 的 FunctionComponent、FunctionController
  • 创建参数经 StandardMessageCodec 解码为 HashMap 后传入原生

兼容性 #

  • Flutter: 3.35.8-ohos-0.0.2
  • Dart: 3.9.2
  • HarmonyOS SDK: 5.1.0(18)

0
likes
50
points
61
downloads

Documentation

Documentation
API reference

Publisher

verified publishernutpi.net

Weekly Downloads

HarmonyOS 小艺智能体 Flutter 插件,通过 PlatformView 嵌入原生 FunctionComponent,在 Flutter 应用中一键唤起智能体对话。仅支持 Flutter OHOS 平台。

Repository
View/report issues

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on aiagent_ohos

Packages that implement aiagent_ohos