normalizeObject static method
Normalizes either a new string ID or a deprecated Capability value.
Implementation
static CapabilityId normalizeObject(Object? value) {
if (value is Capability) {
return value.wireValue;
}
if (value is String) {
return normalize(value);
}
throw FormatException('Expected a capability ID string, got "$value".');
}