PublisherModel.fromJson constructor
PublisherModel.fromJson(
- Object? j
Implementation
factory PublisherModel.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return PublisherModel(
name: switch (json['name']) {
null => '',
Object $1 => decodeString($1),
},
versionId: switch (json['versionId']) {
null => '',
Object $1 => decodeString($1),
},
openSourceCategory: switch (json['openSourceCategory']) {
null => PublisherModel_OpenSourceCategory.$default,
Object $1 => PublisherModel_OpenSourceCategory.fromJson($1),
},
parent: switch (json['parent']) {
null => null,
Object $1 => PublisherModel_Parent.fromJson($1),
},
supportedActions: switch (json['supportedActions']) {
null => null,
Object $1 => PublisherModel_CallToAction.fromJson($1),
},
frameworks: switch (json['frameworks']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"frameworks" is not a list'),
},
launchStage: switch (json['launchStage']) {
null => PublisherModel_LaunchStage.$default,
Object $1 => PublisherModel_LaunchStage.fromJson($1),
},
versionState: switch (json['versionState']) {
null => PublisherModel_VersionState.$default,
Object $1 => PublisherModel_VersionState.fromJson($1),
},
publisherModelTemplate: switch (json['publisherModelTemplate']) {
null => '',
Object $1 => decodeString($1),
},
predictSchemata: switch (json['predictSchemata']) {
null => null,
Object $1 => PredictSchemata.fromJson($1),
},
);
}