Directory.fromJson constructor

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

Implementation

factory Directory.fromJson(Map<String, dynamic> json) {
  return Directory(
    name: json['name'] as String,
    nestedDirectories:
        (json['nestedDirectories'] as List).map((e) => e as String).toList(),
    nestedFiles: (json['nestedFiles'] as List)
        .map((e) => File.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}