Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: add comment to RenderPlugins

Lucas.Xu88f73bfbd4b6
diff --git a/frontend/app_flowy/packages/flowy_editor/lib/render/render_plugins.dart b/frontend/app_flowy/packages/flowy_editor/lib/render/render_plugins.dart
index 84e3d894b7..49929f17e1 100644
--- a/frontend/app_flowy/packages/flowy_editor/lib/render/render_plugins.dart
+++ b/frontend/app_flowy/packages/flowy_editor/lib/render/render_plugins.dart
@@ -16,10 +16,14 @@ class RenderPlugins {
// unused
// Map<String, NodeBuilder> nodeBuilders = {};
+ /// register plugin to render specified [name].
+ /// [name] should be correspond to the [type] in [Node].
+ /// [name] could be empty.
void register(String name, NodeWidgetBuilderF builder) {
nodeWidgetBuilders[name] = builder;
}
+ /// unRegister plugin with specified [name].
void unRegister(String name) {
nodeWidgetBuilders.removeWhere((key, _) => key == name);
}