ClassificationCategory.fromJson constructor
ClassificationCategory.fromJson(
- Object? j
Implementation
factory ClassificationCategory.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return ClassificationCategory(
name: switch (json['name']) {
null => '',
Object $1 => decodeString($1),
},
confidence: switch (json['confidence']) {
null => 0,
Object $1 => decodeDouble($1),
},
severity: switch (json['severity']) {
null => 0,
Object $1 => decodeDouble($1),
},
);
}