runWithOutput method

  1. @override
Future<void> runWithOutput(
  1. Configuration<DbUserCreateOption> commandConfig,
  2. CommandOutput output
)
override

Runs this command with prepared configuration and output.

Subclasses should override this method.

Implementation

@override
Future<void> runWithOutput(
  final Configuration<DbUserCreateOption> commandConfig,
  final CommandOutput output,
) async {
  final projectId = commandConfig.value(DbUserCreateOption.projectId);
  final username = commandConfig.value(DbUserCreateOption.username);

  await renderCommand(
    output,
    operation: () => DbOperations.createSuperUser(
      runner.serviceProvider.cloudApiClient,
      projectId: projectId,
      username: username,
    ),
    textOutputUi: const DbUserCreateTextUi(),
  );
}