GetFolderOutput.fromJson constructor

GetFolderOutput.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory GetFolderOutput.fromJson(Map<String, dynamic> json) {
  return GetFolderOutput(
    commitId: json['commitId'] as String,
    folderPath: json['folderPath'] as String,
    files: (json['files'] as List?)
        ?.whereNotNull()
        .map((e) => File.fromJson(e as Map<String, dynamic>))
        .toList(),
    subFolders: (json['subFolders'] as List?)
        ?.whereNotNull()
        .map((e) => Folder.fromJson(e as Map<String, dynamic>))
        .toList(),
    subModules: (json['subModules'] as List?)
        ?.whereNotNull()
        .map((e) => SubModule.fromJson(e as Map<String, dynamic>))
        .toList(),
    symbolicLinks: (json['symbolicLinks'] as List?)
        ?.whereNotNull()
        .map((e) => SymbolicLink.fromJson(e as Map<String, dynamic>))
        .toList(),
    treeId: json['treeId'] as String?,
  );
}