flutterCreateProject function

Future<void> flutterCreateProject({
  1. required String path,
  2. String template = flutterTemplateApp,
  3. List<String>? platforms,
  4. bool? noAnalyze,
})

Create a flutter project.

Implementation

Future<void> flutterCreateProject({
  required String path,
  String template = flutterTemplateApp,
  List<String>? platforms,
  bool? noAnalyze,
}) async {
  await Directory(path).prepare();

  var shell = Shell().cd(dirname(path));

  await shell.run(
      'flutter create --template $template ${shellArgument(basename(path))}${platforms != null ? ' --platforms ${platforms.join(',')}' : ''}');
}