realize method
Realizes spec into a live component, or returns null when no codec is
registered for its type.
Implementation
Component? realize(ComponentSpec spec, RealizeContext context) {
final component = codecFor(spec.type)?.realize(spec, context);
if (component != null) {
final enabled = spec.properties['enabled'];
if (enabled is BoolValue) component.enabled = enabled.value;
}
return component;
}