check method
Checks permission (String or TPermission); null permission is always allowed.
Implementation
TAuthResult check(Object? permission, {required TAuthTarget target, TAuthMode? onDenied}) {
final p = TPermission.from(permission);
if (p == null) return TAuthResult.allowed;
final g = _granter;
if (g == null) return TAuthResult.allowed;
final granted = _loading ? !config.failClosedWhileLoading : p.evaluate(g.has);
return granted ? TAuthResult.allowed : TAuthResult(config.resolve(target, onDenied));
}