supports method

bool supports(
  1. String capabilityName
)

Checks if the capability with the specified capabilityName is supported.

Implementation

bool supports(String capabilityName) =>
    capabilities?.firstWhereOrNull((c) => c.name == capabilityName) != null;