Pearoo 7b517b333a Revert "Rename everything filcnaplo-related to refilc"
This reverts commit d1a9625d93f30c19068f52fa9848a8266d8d97e7.
2023-09-19 18:16:57 +02:00

38 lines
856 B
Dart

class News {
String id;
String title;
String content;
String link;
String openLabel;
String platform;
bool emergency;
DateTime expireDate;
Map? json;
News({
required this.id,
required this.title,
required this.content,
required this.link,
required this.openLabel,
required this.platform,
required this.emergency,
required this.expireDate,
this.json,
});
factory News.fromJson(Map json) {
return News(
id: json["id"] ?? "",
title: json["title"] ?? "",
content: json["content"] ?? "",
link: json["link"] ?? "",
openLabel: json["open_label"] ?? "",
platform: json["platform"] ?? "",
emergency: json["emergency"] ?? false,
expireDate: DateTime.parse(json["expire_date"] ?? ''),
json: json,
);
}
}