setUserRoles method

Future<User> setUserRoles(
  1. String sdkId,
  2. String userId,
  3. ListOfIds rolesId
)

Implementation

Future<User> setUserRoles(String sdkId, String userId, ListOfIds rolesId) async {
	final res = await _methodChannel.invokeMethod<String>(
		'UserApi.setUserRoles',
		{
			"sdkId": sdkId,
			"userId": jsonEncode(userId),
			"rolesId": jsonEncode(ListOfIds.encode(rolesId)),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method setUserRoles");
	final parsedResJson = jsonDecode(res);
	return User.fromJSON(parsedResJson);
}