fetchMemberAttributes method
获取单个群成员所有自定义属性。
Param groupId 群组 ID。
Param userId 要获取的自定义属性的群成员的用户 ID, 默认为当前用户 ID。
Return 需要查询的用户属性。
Throws 如果有异常会在此抛出,包括错误码和错误信息,详见 ChatError。
Implementation
Future<Map<String, String>> fetchMemberAttributes({
  required String groupId,
  String? userId,
}) async {
  Map req = {'groupId': groupId};
  req.putIfNotNull('userId', userId);
  Map result = await _channel.invokeMethod(
      ChatMethodKeys.fetchMemberAttributesFromGroup, req);
  try {
    ChatError.hasErrorFromResult(result);
    Map<String, String> ret = {};
    result[ChatMethodKeys.fetchMemberAttributesFromGroup]
        .forEach((key, value) {
      ret[key] = value;
    });
    return ret;
  } on ChatError catch (e) {
    throw e;
  }
}