applyWithCommandName method
Applies the rename command to all platform file editors.
Parameters:
commandName
: The name of the rename command to apply.value
: The value to set.
Implementation
Future<void> applyWithCommandName({
String? commandName,
String? value,
}) async {
if (commandName == null) {
throw ArgumentError('Command name cannot be null');
}
var command = RenameCommand.values.firstWhere(
(e) => e.name == commandName,
orElse: () => throw ArgumentError('Invalid command name: $commandName'),
);
await _handleCommand(command, value);
}