mirror of
https://github.com/AppFlowy-IO/AppFlowy
synced 2026-05-24 09:38:25 +00:00
chore: add comment to RenderPlugins
This commit is contained in:
parent
cf0da22d63
commit
88f73bfbd4
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue