CharacterWidget class

Flutter 原生角色 Widget

Inheritance

Constructors

CharacterWidget({Key? key, String? sessionToken, CharacterSetUpStateChangedCallback? setUpStateChanged, CharacterLoadStateChangedCallback? loadStateChanged, CharacterConnectionStateChangedCallback? connectionStateChanged, CharacterConversationStateChangedCallback? conversationStateChanged, CharacterPlayerStateChangedCallback? playerStateChanged, CharacterPlayerErrorCallback? didEncounteredPlayerError})
const

Properties

connectionStateChanged CharacterConnectionStateChangedCallback?
服务连接状态变更回调
final
conversationStateChanged CharacterConversationStateChangedCallback?
对话状态变更回调
final
didEncounteredPlayerError CharacterPlayerErrorCallback?
播放器错误回调
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadStateChanged CharacterLoadStateChangedCallback?
数字人加载状态
final
playerStateChanged CharacterPlayerStateChangedCallback?
播放器状态变更回调
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessionToken String?
鉴权token
final
setUpStateChanged CharacterSetUpStateChangedCallback?
SDK设置状态变更回调
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<CharacterWidget>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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

Static Methods

createWithController({required GlobalKey<State<CharacterWidget>> key, String sessionToken = "", CharacterSetUpStateChangedCallback? setUpStateChanged, CharacterLoadStateChangedCallback? loadStateChanged, CharacterConnectionStateChangedCallback? connectionStateChanged, CharacterConversationStateChangedCallback? conversationStateChanged, CharacterPlayerStateChangedCallback? playerStateChanged, CharacterPlayerErrorCallback? didEncounteredPlayerError}) CharacterWidget
创建一个带有 GlobalKey 的 CharacterWidget,方便外部控制