Client class
IM Client of RTM Plugin.
Constructors
-
Client({required String id, String? tag, Future<
Signature> openSignatureHandler({required Client client})?, Future<Signature> conversationSignatureHandler({String? action, required Client client, Conversation? conversation, List? targetIDs})?}) - To create an IM Client with an Client.id and an optional Client.tag.
Properties
-
conversationMap
→ Map<
String, Conversation> -
The map of the Conversations which belong to the Client in memory, the key is Conversation.id.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The ID of the Client, it should not be
null
.final - onBlocked ↔ void Function({DateTime? atDate, String? byClientID, required Client client, required Conversation conversation})?
-
Current client be blocked from the
conversation
.getter/setter pair - onClosed ↔ void Function({required Client client, required RTMException exception})?
-
The closed event of the
client
,exception
will never benull
.getter/setter pair - onDisconnected ↔ void Function({required Client client, RTMException? exception})?
-
The disconnected event of the
client
,exception
is optional.getter/setter pair - onInfoUpdated ↔ void Function({DateTime? atDate, String? byClientID, required Client client, required Conversation conversation, Map? updatedAttributes, Map? updatingAttributes})?
-
The attributes of the
conversation
has been updated.getter/setter pair - onInvited ↔ void Function({DateTime? atDate, String? byClientID, required Client client, required Conversation conversation})?
-
The
client
has been invited to theconversation
.getter/setter pair - onKicked ↔ void Function({DateTime? atDate, String? byClientID, required Client client, required Conversation conversation})?
-
The
client
has been kicked from theconversation
.getter/setter pair - onLastDeliveredAtUpdated ↔ void Function({required Client client, required Conversation conversation})?
-
The Conversation.lastDeliveredAt of the
conversation
has been updated.getter/setter pair - onLastReadAtUpdated ↔ void Function({required Client client, required Conversation conversation})?
-
The Conversation.lastReadAt of the
conversation
has been updated.getter/setter pair - onMembersBlocked ↔ void Function({DateTime? atDate, String? byClientID, required Client client, required Conversation conversation, List? members})?
-
Some
members
have blocked from theconversation
.getter/setter pair - onMembersJoined ↔ void Function({DateTime? atDate, String? byClientID, required Client client, required Conversation conversation, List? members})?
-
Some
members
have joined to theconversation
.getter/setter pair - onMembersLeft ↔ void Function({DateTime? atDate, String? byClientID, required Client client, required Conversation conversation, List? members})?
-
Some
members
have left from theconversation
.getter/setter pair - onMembersMuted ↔ void Function({DateTime? atDate, String? byClientID, required Client client, required Conversation conversation, List? members})?
-
Some
members
have muted from theconversation
.getter/setter pair - onMembersUnBlocked ↔ void Function({DateTime? atDate, String? byClientID, required Client client, required Conversation conversation, List? members})?
-
Some
members
have unblocked from theconversation
.getter/setter pair - onMembersUnMuted ↔ void Function({DateTime? atDate, String? byClientID, required Client client, required Conversation conversation, List? members})?
-
Some
members
have unmuted from theconversation
.getter/setter pair - onMessage ↔ void Function({required Client client, required Conversation conversation, required Message message})?
-
conversation
has amessage
.getter/setter pair - onMessageDelivered ↔ void Function({DateTime? atDate, required Client client, required Conversation conversation, String? messageID, String? toClientID})?
-
The sent message(ID is
messageID
) that send toconversation
withreceipt
option, has been delivered to the client(ID istoClientID
).getter/setter pair - onMessageRead ↔ void Function({DateTime? atDate, String? byClientID, required Client client, required Conversation conversation, String? messageID})?
-
The sent message(ID is
messageID
) that send toconversation
withreceipt
option, has been read by the client(ID istoClientID
).getter/setter pair - onMessageRecalled ↔ void Function({required Client client, required Conversation conversation, required RecalledMessage recalledMessage})?
-
The sent message in the
conversation
has been recalled(updated torecalledMessage
).getter/setter pair - onMessageUpdated ↔ void Function({required Client client, required Conversation conversation, int? patchCode, String? patchReason, required Message updatedMessage})?
-
The sent message in
conversation
has been updated toupdatedMessage
.getter/setter pair - onMuted ↔ void Function({DateTime? atDate, String? byClientID, required Client client, required Conversation conversation})?
-
Current client be muted from the
conversation
.getter/setter pair - onOpened ↔ void Function({required Client client})?
-
The reopened event of the
client
.getter/setter pair - onResuming ↔ void Function({required Client client})?
-
The resuming event of the
client
.getter/setter pair - onUnblocked ↔ void Function({DateTime? atDate, String? byClientID, required Client client, required Conversation conversation})?
-
Current client be unblocked from the
conversation
.getter/setter pair - onUnmuted ↔ void Function({DateTime? atDate, String? byClientID, required Client client, required Conversation conversation})?
-
Current client be unmuted from the
conversation
.getter/setter pair - onUnreadMessageCountUpdated ↔ void Function({required Client client, required Conversation conversation})?
-
The Conversation.unreadMessageCount of the
conversation
has been updated.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tag → String?
-
The tag of the Client. it is optional.
final
Methods
-
call(
{required String method, required Map arguments}) → Future -
inherited
-
close(
) → Future< void> - To end IM service.
-
conversationQuery(
) → ConversationQuery - To create a new ConversationQuery.
-
createChatRoom(
{String? name, Map< String, dynamic> ? attributes}) → Future<ChatRoom> - To create a new ChatRoom.
-
createConversation(
{bool isUnique = true, required Set< String> members, String? name, Map<String, dynamic> ? attributes}) → Future<Conversation> - To create a normal Conversation.
-
createTemporaryConversation(
{required Set< String> members, int? timeToLive}) → Future<TemporaryConversation> - To create a new TemporaryConversation.
-
errorFrom(
Map result) → RTMException -
inherited
-
isFailure(
Map result) → bool -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
open(
{bool reconnect = false}) → Future< void> - To start IM service.
-
parseIsoString(
String? isoString) → DateTime? -
inherited
-
parseMilliseconds(
int? milliseconds) → DateTime? -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited