enabledPermissionsOfType method

List<APIPermission> enabledPermissionsOfType(
  1. String type, {
  2. DateTime? now,
})

Implementation

List<APIPermission> enabledPermissionsOfType(String type, {DateTime? now}) {
  now ??= DateTime.now();
  return permissions
      .where((p) => p.type == type && p.isEnabled(now: now))
      .toList();
}