createLocationMessage method

  1. @override
Future<V2TimMsgCreateInfoResult?> createLocationMessage({
  1. required String desc,
  2. required double longitude,
  3. required double latitude,
})
override

Implementation

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