of static method

Set<PermissionKey> of(
  1. BuildContext context
)

Reads the nearest PermissionScope's permissions. Returns an empty set when no scope is found.

Implementation

static Set<PermissionKey> of(BuildContext context) {
  final scope =
      context.dependOnInheritedWidgetOfExactType<PermissionScope>();
  return scope?.permissions ?? const {};
}