removeExtension method
Removes an extension by its ID.
The extension's NodeFlowExtension.detach method is called before removal. Does nothing if no extension with the given ID is registered.
Example:
controller.removeExtension('undo-redo');
Implementation
void removeExtension(String id) {
final index = _extensions.indexWhere((e) => e.id == id);
if (index == -1) return;
final extension = _extensions.removeAt(index);
extension.detach();
}