V2TIMManager class Null safety Manager

Core class of the IM SDK, implementing features such as IM SDK initialization and login, message sending and receiving, and group creation and quitting

initSDK Init SDK

unInitSDK Uninitialize the SDK

login Log in

logout Log out

getLoginUser Get the UserID of the current login user

getLoginStatus Get the login status

addSimpleMsgListener Set an event listener for simple messages (text and custom messages)

removeSimpleMsgListener Remove the event listener for simple messages (text and custom messages)

sendC2CTextMessage Send a one-to-one text message (up to 8 KB)

sendC2CCustomMessage Send a one-to-one custom message (up to 8 KB)

sendGroupTextMessage Send a group text message (up to 8 KB)

sendGroupCustomMessage Send a group custom message (up to 8 KB)

setGroupListener Set an event listener for groups

createGroup Create groups (deprecated)

joinGroup Join a group

quitGroup Leave a group

Properties

groupListenerList Map<String, V2TimGroupListener>
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
initSDKListenerList Map<String, V2TimSDKListener>
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
simpleMessageListenerList Map<String, V2TimSimpleMsgListener>
read / write

Methods

addGroupListener({required V2TimGroupListener listener}) Future<void>
Add group listener [...]
addSimpleMsgListener({required V2TimSimpleMsgListener listener}) Future<void>
Set an event listener for simple messages (text and custom messages) [...]
@Deprecated('Simple message is deprecated since 3.6.0, please use the advanced send and receive messages under messageManager, this interface will be removed in future versions')
callExperimentalAPI({required String api, Object? param}) Future<V2TimValueCallback<Object>>
Experimental API interface [...]
createGroup({required String groupType, required String groupName, String? groupID}) Future<V2TimValueCallback<String>>
Create a group [...]
@Deprecated('Simple group creation is deprecated since 3.6.0, please use advanced group creation under groupManager, this interface will be removed in future versions')
dismissGroup({required String groupID}) Future<V2TimCallback>
Delete a group [...]
getConversationManager() V2TIMConversationManager
Conversation feature entry [...]
getFriendshipManager() V2TIMFriendshipManager
Relationship chain feature entry [...]
getGroupManager() V2TIMGroupManager
Advanced group feature entry [...]
getLoginStatus() Future<V2TimValueCallback<int>>
Get the login status [...]
getLoginUser() Future<V2TimValueCallback<String>>
Get the UserID of the current login user
getMessageManager() V2TIMMessageManager
Advanced message feature entry [...]
getOfflinePushManager() V2TIMOfflinePushManager
Offline push feature entry [...]
getServerTime() Future<V2TimValueCallback<int>>
Get the current server time [...]
getSignalingManager() V2TIMSignalingManager
Signaling entry [...]
getUsersInfo({required List<String> userIDList}) Future<V2TimValueCallback<List<V2TimUserFullInfo>>>
Get user profiles [...]
getVersion() Future<V2TimValueCallback<String>>
Get the version number
initSDK({required int sdkAppID, required LogLevelEnum loglevel, required V2TimSDKListener listener}) Future<V2TimValueCallback<bool>>
Initialize the SDK [...]
joinGroup({required String groupID, required String message, String? groupType}) Future<V2TimCallback>
Join a group [...]
login({required String userID, required String userSig}) Future<V2TimCallback>
Log in [...]
logout() Future<V2TimCallback>
Log out [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
printWarning(String text) → void
quitGroup({required String groupID}) Future<V2TimCallback>
Leave a group [...]
removeGroupListener({V2TimGroupListener? listener}) Future<void>
remove group listener
removeSimpleMsgListener({V2TimSimpleMsgListener? listener}) Future<void>
Remove the event listener for simple messages (text and custom messages) [...]
@Deprecated('Simple message is deprecated since 3.6.0, please use the advanced send and receive messages under messageManager, this interface will be removed in future versions')
sendC2CCustomMessage({required String customData, required String userID}) Future<V2TimValueCallback<V2TimMessage>>
Send a single chat custom (signaling) message (maximum support 8KB) (deprecated since 3.6.0, please use the advanced send and receive messages under MessageManager) [...]
@Deprecated('Simple message is deprecated since 3.6.0, please use the advanced send and receive messages under messageManager, this interface will be removed in future versions')
sendC2CTextMessage({required String text, required String userID}) Future<V2TimValueCallback<V2TimMessage>>
Send single-chat ordinary text messages (maximum support 8KB) (deprecated since 3.6.0, please use advanced sending and receiving messages under MessageManager) [...]
@Deprecated('Simple message is deprecated since 3.6.0, please use the advanced send and receive messages under messageManager, this interface will be removed in future versions')
sendGroupCustomMessage({required String customData, required String groupID, MessagePriorityEnum priority = MessagePriorityEnum.V2TIM_PRIORITY_NORMAL}) Future<V2TimValueCallback<V2TimMessage>>
Send group chat custom (signaling) messages (maximum support 8KB) (deprecated since 3.6.0, please use advanced sending and receiving messages under MessageManager) [...]
@Deprecated('Simple message is deprecated since 3.6.0, please use the advanced send and receive messages under messageManager, this interface will be removed in future versions')
sendGroupTextMessage({required String text, required String groupID, int priority = 0}) Future<V2TimValueCallback<V2TimMessage>>
Send group chat ordinary text messages (maximum support 8KB) (deprecated since 3.6.0, please use advanced sending and receiving messages under MessageManager) [...]
@Deprecated('Simple message is deprecated since 3.6.0, please use the advanced send and receive messages under messageManager, this interface will be removed in future versions')
setAPNSListener() Future
Set the APNs listener
setGroupListener({required V2TimGroupListener listener}) Future<void>
Set an event listener for groups [...]
setSelfInfo({required V2TimUserFullInfo userFullInfo}) Future<V2TimCallback>
Modify one's own user profile
toString() String
A string representation of this object. [...]
inherited
unInitSDK() Future<V2TimCallback>
Uninitialize the SDK

Operators

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