AIRobotManager class

用户级 AI 机器人管理 登录成功后分页拉取当前用户下所有机器人并缓存在内存中

Constructors

AIRobotManager.forTesting(String? accountProvider())
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
robotChanged Stream<List<V2NIMUserAIBot>>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearCache() → void
Clears all robot data, including any cached robot configuration token.
createRobot(V2NIMCreateUserAIBotParams params) Future<NIMResult<V2NIMUserAIBot>>
Creates a robot and synchronizes the created robot to the local cache.
deleteRobot(String accid) Future<NIMResult<void>>
Deletes a robot and removes it from the local cache after success.
fetchRobot(String accid) Future<NIMResult<V2NIMUserAIBot>>
Fetches a robot and updates the local cache when it exists.
getAllRobotList() List<V2NIMUserAIBot>
Returns cached robots only when they belong to the current login account.
getAllRobots() Future<void>
getRobotById(String accid) → V2NIMUserAIBot?
init() → void
isRobot(String? accid) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshRobotToken(String accid) Future<NIMResult<V2NIMUserAIBot>>
Refreshes a robot token and synchronizes the refreshed robot to cache.
toString() String
A string representation of this object.
inherited
updateRobot(V2NIMUpdateUserAIBotParams params) Future<NIMResult<V2NIMUserAIBot>>
Updates a robot and synchronizes its latest data to the local cache.
upsertRobot(V2NIMUserAIBot bot) → void
Add or update a single AI robot in memory cache.

Operators

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

Static Properties

instance AIRobotManager
final

Constants

logTag → const String
pageSize → const int