mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: add comment to RenderPlugins
This commit is contained in:
parent
cf0da22d63
commit
88f73bfbd4
@ -16,10 +16,14 @@ class RenderPlugins {
|
|||||||
// unused
|
// unused
|
||||||
// Map<String, NodeBuilder> nodeBuilders = {};
|
// 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) {
|
void register(String name, NodeWidgetBuilderF builder) {
|
||||||
nodeWidgetBuilders[name] = builder;
|
nodeWidgetBuilders[name] = builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// unRegister plugin with specified [name].
|
||||||
void unRegister(String name) {
|
void unRegister(String name) {
|
||||||
nodeWidgetBuilders.removeWhere((key, _) => key == name);
|
nodeWidgetBuilders.removeWhere((key, _) => key == name);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user