SDK
SDK Dart Null Safety v3.x
2

getRoles #

Loads information about the profile roles.

Arguments #

getRoles();

Resolve #

Resolves to an array of Role.

Usage #

await kuzzle
  .auth
  .login(
    'local',
    {
      'username': 'foo',
      'password': 'bar'
    },
  );
KuzzleUser user = await kuzzle
  .auth
  .getCurrentUser();
List<KuzzleProfile> profiles = await user.getProfiles();
List<KuzzleRole> roles = await profiles[0].getRoles();