Answer class
简化图文结果表示
对于一些技能,支持直接返回一段文本应答结果,同时辅助一张图片和相关链接。应用可以无需解析和 提取语义/结果的结构化数据信息,直接显示该字段的图文信息。同时用户可以选择通过开放平台编辑和 上传/导入图文应答信息,快速自定义扩展应用交互。
Constructors
- Answer({required String text, AnswerType? type, String? imgUrl, String? imgDesc, String? url, String? urlDesc, String? emotion})
-
const
- Answer.fromJson(Map json)
-
factory
Properties
- emotion → String?
-
回答的情绪,取值参见附录的情感标签对照表
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- imgDesc → String?
-
图片的描述文字
final
- imgUrl → String?
-
图片的链接地址,属于image数据
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String
-
通用的文字显示,属于text数据
final
- type → AnswerType?
-
显示的类型,通过这个类型,可以确定数据的返回内容和客户端的显示内容,默认值为 T 。
final
- url → String?
-
url链接
final
- urlDesc → String?
-
url链接的描述文字
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited