LocalCommandRegistry.withDefaults constructor
LocalCommandRegistry.withDefaults()
Creates a registry pre-populated with the browser-safe built-in commands
(:help, :info, :tree, :tunnel, …).
File-transfer commands that need local filesystem access (:download,
:upload, :drive) are NOT included here so this registry compiles to
JavaScript for the web client; native embedders add them with
LocalCommandRegistry.withDefaults()..addFileTransferCommands() (see the
FileTransferCommands extension in file_transfer_commands.dart).
Implementation
factory LocalCommandRegistry.withDefaults() {
final registry = LocalCommandRegistry();
for (final command in _builtIns) {
registry.register(command);
}
return registry;
}