createDirectories static method

Future<void> createDirectories(
  1. String projectPath
)

Implementation

static Future<void> createDirectories(String projectPath) async {
  Directory libDirectory = await getApplicationDocumentsDirectory();
  String libPath = libDirectory.path;

  // Parcourir les dossiers à créer
  for (String folderName in ['data', 'models']) {
    // Créer le dossier
    String folderPath = path.join(libPath, folderName);
    await Directory(folderPath).create();
  }
}