getUserAttributes method

Future<Map<String, dynamic>> getUserAttributes(
  1. String userId
)

Gets all attributes of a specified user.

Implementation

Future<Map<String, dynamic>> getUserAttributes(String userId) async {
  final res = await _callNative("getUserAttributes", {'userId': userId});
  if (res["errorCode"] != 0)
    throw AgoraRtmClientException(
        "getUserAttributes failed errorCode:${res['errorCode']}",
        res['errorCode']);
  return Map<String, dynamic>.from(res["attributes"]);
}