News.fromJson constructor

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

Implementation

factory News.fromJson(Map<String, dynamic> json) => News(
      image: json["image"],
      url: json["url"],
      date: DateTime.parse(json["publishedDate"]),
      headline: json["title"],
      source: json["site"],
      summary: json["text"],
    );