Article.fromJson constructor

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

Implementation

factory Article.fromJson(Map<String, dynamic> json) {
  return Article(
    uid: json['uid'] as String,
    previewImageUrl: json['previewImageUrl'] as String?,
    publicationDate: DateTime.parse(json['publicationDate'] as String),
    locale: json['locale'] as String,
    title: json['title'] as String,
    slug: json['slug'] as String,
    contentPreview: json['contentPreview'] as String,
    content: json['content'] as String?,
  );
}