isEnabled method Null safety

bool isEnabled(
  1. String capabilityName
)

Checks if the capability with the specified capabilityName has been enabled.

Implementation

bool isEnabled(String capabilityName) {
  return (enabledCapabilities
          .firstWhereOrNull((c) => c.name == capabilityName) !=
      null);
}