setUserRolesInGroup method

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

Implementation

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