dartCreateProject function

Future<void> dartCreateProject({
  1. String template = dartTemplateConsoleSimple,
  2. required String path,
})

Create a dart project.

Implementation

Future<void> dartCreateProject(
    {String template = dartTemplateConsoleSimple, required String path}) async {
  await Directory(path).prepare();

  var shell = Shell().cd(dirname(path));
  await shell
      .run('dart create --template $template ${shellArgument(basename(path))}');
}