NotebookSoftwareConfig.fromJson constructor
NotebookSoftwareConfig.fromJson(
- Object? j
Implementation
factory NotebookSoftwareConfig.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return NotebookSoftwareConfig(
colabImage: switch (json['colabImage']) {
null => null,
Object $1 => ColabImage.fromJson($1),
},
env: switch (json['env']) {
null => [],
List<Object?> $1 => [for (final i in $1) EnvVar.fromJson(i)],
_ => throw const FormatException('"env" is not a list'),
},
postStartupScriptConfig: switch (json['postStartupScriptConfig']) {
null => null,
Object $1 => PostStartupScriptConfig.fromJson($1),
},
);
}