supports method Null safety

bool supports(
  1. String capabilityName
)

Checks if the capability with the specified capabilityName is supported.

Implementation

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