Client constructor
Client({})
To create an IM Client with an Client.id and an optional Client.tag.
You can implement below signature handlers as required to enable the feature about signature.
openSignatureHandler
is a handler for Client.open.conversationSignatureHandler
is a handler for the functions about Conversation, details as below:- When
action
iscreate
, means Client.createConversation or Client.createChatRoom is invoked. - When
action
isinvite
, means Conversation.join or Conversation.addMembers is invoked. - When
action
iskick
, means Conversation.quit or Conversation.removeMembers is invoked.
- When
Implementation
Client({
required this.id,
this.tag,
Future<Signature> Function({
required Client client,
})?
openSignatureHandler,
Future<Signature> Function({
required Client client,
Conversation? conversation,
List? targetIDs,
String? action,
})?
conversationSignatureHandler,
}) : _openSignatureHandler = openSignatureHandler,
_conversationSignatureHandler = conversationSignatureHandler;