AgoraRtmClient class

Properties

hashCode int
The hash code for this object.
no setterinherited
onConnectionStateChanged ↔ void Function(int? state, int? reason)?
Occurs when the connection state between the SDK and the Agora RTM system changes.
getter/setter pair
onError ↔ void Function()?
Occurs when you receive error events.
getter/setter pair
onFileMessageReceived ↔ void Function(AgoraRtmFileMessage message, String? peerId)?
Occurs when receiving a channel file message.
getter/setter pair
onImageMessageReceived ↔ void Function(AgoraRtmImageMessage message, String? peerId)?
Occurs when receiving a channel image message.
getter/setter pair
onLocalInvitationAccepted ↔ void Function(AgoraRtmLocalInvitation invite)?
Callback to the caller: occurs when the caller accepts the call invitation.
getter/setter pair
onLocalInvitationCanceled ↔ void Function(AgoraRtmLocalInvitation invite)?
Callback to the caller: occurs when the caller cancels a call invitation.
getter/setter pair
onLocalInvitationFailure ↔ void Function(AgoraRtmLocalInvitation invite, int? errorCode)?
Callback to the caller: occurs when the life cycle of the outgoing call invitation ends in failure.
getter/setter pair
onLocalInvitationReceivedByPeer ↔ void Function(AgoraRtmLocalInvitation invite)?
Callback to the caller: occurs when the caller receives the call invitation.
getter/setter pair
onLocalInvitationRefused ↔ void Function(AgoraRtmLocalInvitation invite)?
Callback to the caller: occurs when the caller declines the call invitation.
getter/setter pair
onMediaDownloadingProgress ↔ void Function(int? currentSize, int? totalSize, int? requestId)?
Occurs when channel media downloading progress changed.
getter/setter pair
onMediaUploadingProgress ↔ void Function(int? currentSize, int? totalSize, int? requestId)?
Occurs when channel media uploading progress changed.
getter/setter pair
onMessageReceived ↔ void Function(AgoraRtmMessage message, String? peerId)?
Occurs when the local user receives a peer-to-peer message.
getter/setter pair
onRemoteInvitationAccepted ↔ void Function(AgoraRtmRemoteInvitation invite)?
Callback to the caller: occurs when the callee accepts the call invitation.
getter/setter pair
onRemoteInvitationCanceled ↔ void Function(AgoraRtmRemoteInvitation invite)?
Callback to the caller: occurs when the caller cancels a call invitation.
getter/setter pair
onRemoteInvitationFailure ↔ void Function(AgoraRtmRemoteInvitation invite, int? errorCode)?
Callback to the caller: occurs when the life cycle of the outgoing call invitation ends in failure.
getter/setter pair
onRemoteInvitationReceivedByPeer ↔ void Function(AgoraRtmRemoteInvitation invite)?
Callback to the caller: occurs when the callee receives the call invitation.
getter/setter pair
onRemoteInvitationRefused ↔ void Function(AgoraRtmRemoteInvitation invite)?
Callback to the caller: occurs when the callee declines the call invitation.
getter/setter pair
onTokenExpired ↔ void Function()?
Occurs when your token expires.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

acceptRemoteInvitation(Map arguments) Future<void>
Allows the callee to accept a call invitation.
addOrUpdateChannelAttributes(String channelId, List<AgoraRtmChannelAttribute> attributes, bool enableNotificationToChannelMembers) Future<void>
Adds or updates the channel's attribute(s).
addOrUpdateLocalUserAttributes(List<Map<String, String>> attributes) Future<void>
Adds or updates the local user’s attribute(s).
cancelLocalInvitation(Map arguments) Future<void>
Allows the caller to cancel a call invitation.
clearChannelAttributes(String channelId, bool enableNotificationToChannelMembers) Future<void>
Clears all attributes of the channel.
clearLocalUserAttributes() Future<void>
Clears all attributes of the local user.
createChannel(String channelId) Future<AgoraRtmChannel?>
Creates an AgoraRtmChannel.
deleteChannelAttributesByKeys(String channelId, List<String> keys, bool enableNotificationToChannelMembers) Future<void>
Deletes the channel's attributes using attribute keys.
deleteLocalUserAttributesByKeys(List<String> keys) Future<void>
Deletes the local user’s attributes using attribute keys.
destroy() Future<void>
Destroy and stop event to the client with related channels.
getChannelAttributes(String channelId) Future<List<AgoraRtmChannelAttribute>>
Gets all attributes of a specified channel.
getChannelAttributesByKeys(String channelId, List<String> keys) Future<List<AgoraRtmChannelAttribute>>
Gets the attributes of a specified channel using attribute keys.
getUserAttributes(String userId) Future<Map<String, dynamic>>
Gets all attributes of a specified user.
getUserAttributesByKeys(String userId, List<String> keys) Future<Map<String, dynamic>>
Gets the attributes of a specified user using attribute keys.
login(String? token, String userId) Future
Allows a user to log in the Agora RTM system.
logout() Future
Allows a user to log out of the Agora RTM system.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queryPeersOnlineStatus(List<String> peerIds) Future<Map<String, dynamic>>
Queries the online status of the specified user(s).
refuseRemoteInvitation(Map arguments) Future<void>
Allows the callee to decline a call invitation.
releaseChannel(String channelId) Future<void>
Releases an AgoraRtmChannel.
renewToken(String token) Future
Renews the token.
sendLocalInvitation(Map arguments) Future<void>
Allows the caller to send a call invitation to the callee.
sendMessageToPeer(String peerId, AgoraRtmMessage message, [bool? offline, bool? historical]) Future<void>
Allows a user to send a peer-to-peer message to a specific peer user.
setChannelAttributes(String channelId, List<AgoraRtmChannelAttribute> attributes, bool enableNotificationToChannelMembers) Future<void>
Substitutes the channel attributes with new ones.
setLocalUserAttributes(List<Map<String, String>> attributes) Future<void>
Substitutes the local user’s attributes with new ones.
setLog(int level, int size, String path) Future
Allows a user set log
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

createInstance(String appId) Future<AgoraRtmClient?>
Initializes an AgoraRtmClient instance
getSdkVersion() Future<String?>
get the agora native sdk version