createTextMessage method

  1. @override
Future<V2TimMsgCreateInfoResult?> createTextMessage({
  1. required String text,
})
override

Implementation

@override
Future<V2TimMsgCreateInfoResult?> createTextMessage(
    {required String text}) async {
  final res = await TencentImSDKPlugin.v2TIMManager
      .getMessageManager()
      .createTextMessage(text: text);
  if (res.code == 0) {
    final messageResult = res.data;
    return messageResult;
  }
  _coreService.callOnCallback(TIMCallback(
      type: TIMCallbackType.API_ERROR,
      errorMsg: res.desc,
      errorCode: res.code));
  return null;
}