Gate class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
allows(String ability)
→ bool
-
Determine if all of the given abilities should be granted for the current user.
Gate().allows('canDeletePost');
-
define(String ability, Function callback)
→ void
-
Define a new ability.
Gate().define('canDeletePost', () {
return user.id == post.user_id;
});
-
denies(String ability)
→ bool
-
Determine if any of the given abilities should be denied for the current user.
-
has(String ability)
→ bool
-
Determine if a given ability has been defined.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited