constructFromFileInfo static method

dynamic constructFromFileInfo(
  1. FileEntry courseFile, {
  2. String? topic,
  3. String? parentFolder,
})

Transforme un objet File en un objet Course, utile notamment pour les fichiers d'un dossier sur celene

Implementation

static constructFromFileInfo(FileEntry courseFile, {String? topic, String? parentFolder}){
  Course subCourse = Course(courseFile.name, "https://celene.insa-cvl.fr", courseFile.type, topic: topic);
  subCourse.updateDownloadStatus();
  subCourse.fromFolder = true;
  subCourse.parentFolder = parentFolder;
  return subCourse;
}