run method

void run(
  1. List<String> args
)

Implementation

void run(List<String> args) {
  if (!validateArgs(args)) return;

  final projectName = args[0];
  final Map<String, dynamic> options = _parseOptions(args);

  final projectPath = p.join(Directory.current.path, projectName);

  if (Directory(projectPath).existsSync()) {
    print('\n❌ A directory named "$projectName" already exists!');
    return;
  }

  _askConfigurationOptions(options);

  _createProject(projectName, projectPath, options);
  _createHomeFeature(projectName, projectPath);
  _showSuccessMessage(projectName, projectPath, options);
}