AnnotationCollection.fromJson constructor
AnnotationCollection.fromJson(
- String jsonStr
Implementation
factory AnnotationCollection.fromJson(String jsonStr) {
final json = jsonDecode(jsonStr) as Map<String, dynamic>;
final annotationsList = json['annotations'] as List;
return AnnotationCollection(
annotations: annotationsList
.map((e) => Annotation.fromJson(e as Map<String, dynamic>,
json['metadata'] as Map<String, dynamic>?))
.toList(),
);
}