registerWidget method

  1. @nonVirtual
void registerWidget(
  1. String name,
  2. WidgetBuilderFunc builder, {
  3. bool abstract = false,
  4. String? baseType = EditorWidget.widget,
  5. Map<String, EditorWidgetType>? widgets,
  6. Map<String, EditorActionType>? actions,
  7. Map<String, EditorPropertyType>? properties,
  8. List<String>? tags,
})

Implementation

@nonVirtual
void registerWidget(
  String name,
  WidgetBuilderFunc builder, {
  bool abstract = false,
  String? baseType = EditorWidget.widget,
  Map<String, EditorWidgetType>? widgets,
  Map<String, EditorActionType>? actions,
  Map<String, EditorPropertyType>? properties,
  List<String>? tags,
}) {
  _widgetBuilders[name] = builder;
  _schema[name] = EditorWidget(
    abstract: abstract,
    baseType: baseType,
    widgets: widgets,
    actions: actions,
    properties: properties,
    tags: tags,
  );
}