ensureFolderExists function

void ensureFolderExists(
  1. String folderPath
)

Creates the folder if it doesn't exist

Implementation

void ensureFolderExists(String folderPath) {
  final dir = Directory(folderPath);
  if (!dir.existsSync()) {
    dir.createSync(recursive: true);
//     print('📁 Created folder: $folderPath');
  }
}