Adding TopNews

This commit is contained in:
2021-03-25 10:54:09 +02:00
parent ce237c13a4
commit e290274a95
17 changed files with 510 additions and 50 deletions
+35
View File
@@ -0,0 +1,35 @@
class News {
final String uid;
final String title;
final DateTime createdAt;
final DateTime updatedAt;
final String previewUrl;
final String sourceUrl;
final DateTime publishedAt;
final String fullPostUrl;
News({
this.uid,
this.title,
this.createdAt,
this.updatedAt,
this.previewUrl,
this.sourceUrl,
this.publishedAt,
this.fullPostUrl,
});
}
final title = "Epoxy is an Android library for building complex screens in a RecyclerView. It abstracts the boilerplate of view holders, item types, item ids, span counts, and more, in order to simplify building screens with multiple view types. Additionally, Epoxy adds support for saving view state and automatic diffing of item changes.";
final sourceUrl = "https://firebasestorage.googleapis.com/v0/b/discover-backend.appspot.com/o/providers%2Fcm%2Fsource.png?alt=media&token=c05913ac-07e0-4402-9fc8-2fc6cc484440";
final url = "https://s.france24.com/media/display/be59c500-68ea-11eb-aefa-005056a98db9/w:1280/p:16x9/e8bbac6ad2d9bac2d5d6410a5394a177fc978f78.webp";
final newsTest = [
News(uid: "1", title: title, previewUrl: url, sourceUrl: sourceUrl),
News(uid: "2", title: title, previewUrl: url, sourceUrl: sourceUrl),
News(uid: "3", title: title, previewUrl: url, sourceUrl: sourceUrl),
News(uid: "4", title: title, previewUrl: url, sourceUrl: sourceUrl),
News(uid: "5", title: title, previewUrl: url, sourceUrl: sourceUrl),
News(uid: "6", title: title, previewUrl: url, sourceUrl: sourceUrl),
News(uid: "7", title: title, previewUrl: url, sourceUrl: sourceUrl),
];