registerSpecType method
void
registerSpecType(
- String name,
- SpecBuildFunction func,
- Map<
String, EditorPropertyType> properties, { - Map<
String, Map< ? subTypes,String, EditorPropertyType> >
Method for registering a property which itself has properties. eg: BoxDecoration, TextStyle
Implementation
@nonVirtual
void registerSpecType(String name, SpecBuildFunction func,
Map<String, EditorPropertyType> properties,
{Map<String, Map<String, EditorPropertyType>>? subTypes}) {
_propertyBuilders[name] = func;
_schema[name] = EditorSpecProperty(properties,
abstract: subTypes != null && subTypes.isNotEmpty);
if (subTypes != null) {
for (var subType in subTypes.keys) {
_schema[subType] =
EditorSpecProperty(subTypes[subType], baseType: name);
}
}
}