add method
Adds new resource to this token request.
name
can either be a String
or a RegExp
.
- If
name
is aString
, it adds a normal resource. - If
name
is aRegExp
, it adds a pattern instead.
Implementation
void add(ResourceType type,
{String? name,
String? pattern,
bool? create,
bool? delete,
bool? manage,
bool? read,
bool? write,
bool? get,
bool? update,
bool? join}) {
_resources.add(Resource(type,
name: name,
pattern: pattern,
create: create,
delete: delete,
manage: manage,
read: read,
write: write,
get: get,
update: update,
join: join));
}