Source.fromJson constructor

Source.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Source.fromJson(Map<String, dynamic> json) {
  return Source(
    owner: (json['Owner'] as String).toOwner(),
    sourceIdentifier: json['SourceIdentifier'] as String,
    sourceDetails: (json['SourceDetails'] as List?)
        ?.whereNotNull()
        .map((e) => SourceDetail.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}