generateFromStrings static method

List<Oauth2Scopes> generateFromStrings({
  1. required List<String> scopesStrings,
})

Generate the scopes from given scopesStrings

Implementation

static List<Oauth2Scopes> generateFromStrings(
    {required List<String> scopesStrings}) {
  List<Oauth2Scopes> scopes = [];

  for (var scopeString in scopesStrings) {
    try {
      var scope = Oauth2ScopesConvertExtension.fromJsonString(
          jsonString: scopeString);
      scopes.add(scope);
    } catch (_) {
      print("hey");
    }
  }

  return scopes;
}