allows method

bool allows(
  1. String ability
)

Determine if all of the given abilities should be granted for the current user. Gate().allows('canDeletePost');

Implementation

bool allows(String ability) {
  final gate = _abilities[ability];
  if (gate != null) {
    return gate();
  }
  return false;
}