register method
Register render plugin with specified type
.
type
should be Node.type and should not be empty.
e.g. 'paragraph', 'image', or 'bulleted_list'
Implementation
@override
void register(String type, BlockComponentBuilder builder) {
Log.editor.info('register block component builder for type($type)');
if (type.isEmpty) {
throw ArgumentError('type should not be empty');
}
if (_builders.containsKey(type)) {
throw ArgumentError('type($type) has been registered');
}
_builders[type] = builder;
}