setExt method

Future<void> setExt(
  1. Map<String, String>? ext
)

设置会话扩展属性。

子区功能目前版本暂不可设置。

Implementation

Future<void> setExt(Map<String, String>? ext) async {
  try {
    Map req = _toJson();
    req.putIfNotNull("ext", ext);
    Map result = await platform_interface.Client.instance.conversationManager
        .callNativeMethod(ChatMethodKeys.syncConversationExt, req);
    ChatError.hasErrorFromResult(result);
    _ext = ext;
  } catch (e) {
    rethrow;
  }
}