ArticleDTO.fromJson constructor

ArticleDTO.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory ArticleDTO.fromJson(Map<String, Object?> json) {
  return ArticleDTO(
    content: json[r'content'] != null
        ? ContentDTO.fromJson(json[r'content']! as Map<String, Object?>)
        : null,
    excerpt: json[r'excerpt'] as String?,
    source: json[r'source'] != null
        ? SourceDTO.fromJson(json[r'source']! as Map<String, Object?>)
        : null,
    title: json[r'title'] as String?,
  );
}