runWithOutput method
Future<void>
runWithOutput(
- Configuration<
SettingsSetOption> commandConfig, - CommandOutput output
override
Runs this command with prepared configuration and output.
Subclasses should override this method.
Implementation
@override
Future<void> runWithOutput(
final Configuration<SettingsSetOption> commandConfig,
final CommandOutput output,
) async {
final name = commandConfig.value(SettingsSetOption.name);
final value = commandConfig.optionalValue(SettingsSetOption.value);
if (value == null) {
throw StateError('Expected the value option to be set.');
}
await renderCommand(
output,
operation: () => SettingsOperations.setSetting(
runner.serviceProvider.scloudSettings,
name: name,
value: value,
),
textOutputUi: const SettingsSetTextUi(),
);
}