sendC2CTextMessage method Null safety
- @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')
@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')
Send single-chat ordinary text messages (maximum support 8KB) (deprecated since 3.6.0, please use advanced sending and receiving messages under MessageManager)
Text messages support cloud-based dirty word filtering. If there are sensitive words in the message sent by the user, the callback will return an error code of 80001.
Back
Returns the unique ID of the message
Note:
The messages sent by this interface will be pushed by default (provided that push is enabled in V2TIMOfflinePushManager). If you need to customize the push (title and content), please call the V2TIMMessageManager.sendMessage interface.
Implementation
@Deprecated('Simple message has been deprecated since 3.6.0, please use advanced send and receive messages under messageManager, this interface will be removed in future versions')
Future<V2TimValueCallback<V2TimMessage>> sendC2CTextMessage ({
required String text,
required String userID,
}) async {
printWarning(
"tencent_im_sdk_plugin: The simple message interface has been deprecated since 3.6.0, please use the advanced send and receive messages under messageManager, This interface will be removed in a future version)");
return ImFlutterPlatform.instance.sendC2CTextMessage(
text: text,
userID: userID,
);
}