registerCommand method
Register a command handler scoped to the current block type.
Implementation
@override
void registerCommand(String commandName, CommandHandler handler) {
if (_currentBlockTypeRegistration == null) {
throw StateError(
'registerCommand can only be called from within BlockHandler.registerScopedCommands',
);
}
_context.blockScopedCommandHandlers.putIfAbsent(
_currentBlockTypeRegistration!,
() => {},
)[commandName] = handler;
}