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