run method
Implementation
@override
String run(ParsedInputs inputs, List<String> args) {
final name = inputs.valueOf(packageName);
// The description is the one step nothing else answers, so the prompt is
// only reached when the argument was left off.
final description =
inputs.valueOf(projectDescription) ??
_descriptionPrompt.asksForDescription();
// A flag answers its own step, so the prompt is only reached when the
// answer is still open.
final installsDependencies =
inputs.valueOf(install) || _installPrompt.confirmsInstallation();
final initializesGitRepository =
inputs.valueOf(initializeGit) || _gitPrompt.confirmsInitialization();
_projectScaffolder.scaffold(
name,
description,
installDependencies: installsDependencies,
initializeGitRepository: initializesGitRepository,
);
final projectPath =
'${_parentDirectory.path}${Platform.pathSeparator}$name';
return [
'Created Mamba command-line application in $projectPath.',
if (!installsDependencies)
'Run `dart pub get` in $projectPath to install its dependencies.',
].join('\n');
}