has method

bool has(
  1. CapabilityKind kind
)

Whether a capability of kind is present.

Implementation

bool has(CapabilityKind kind) => capabilities.any((c) => c.kind == kind);