CharacterController class

角色控制器,提供外部控制 CharacterWidget 的接口

Constructors

CharacterController({required GlobalKey<State<CharacterWidget>> key})

Properties

connectionState CharacterConnectionState?
获取当前连接状态
no setter
conversationState CharacterConversationState?
获取当前对话状态
no setter
errorMessage String?
获取错误信息
no setter
hashCode int
The hash code for this object.
no setterinherited
isAvailable bool
检查控制器是否可用(widget 是否已初始化)
no setter
playerState CharacterPlayerState?
获取当前播放器状态
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setUpState CharacterSetUpState?
获取当前SDK设置状态
no setter

Methods

close() Future<void>
关闭角色对话
interrupt() Future<void>
打断当前对话
loadCharacter(String characterId) Future<void>
加载角色数据
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
preloadCharacter(String characterId) Future<void>
预加载角色数据
sendAudioData(Uint8List audioData) Future<void>
发送音频数据 audioData 音频二进制数据
start() Future<void>
开始角色对话
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited