addApiGrant method

void addApiGrant(
  1. ApiScope grant
)

Implementation

void addApiGrant(ApiScope grant) {
  for (final g in grants) {
    if (g.name == 'api') {
      throw StateError('Can only have a single api grant');
    }
  }
  grants.add(ParticipantGrant.api(grant));
}