feat: add NewsItem and BriefingFeed models with tests

This commit is contained in:
2026-04-06 08:13:06 -04:00
parent a2fc0d6c7d
commit 77fc82af45
3 changed files with 127 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
class BriefingFeed {
final int id;
final String title;
final String url;
final String? category;
const BriefingFeed({
required this.id,
required this.title,
required this.url,
this.category,
});
factory BriefingFeed.fromJson(Map<String, dynamic> json) => BriefingFeed(
id: json['id'] as int,
title: json['title'] as String? ?? '',
url: json['url'] as String? ?? '',
category: json['category'] as String?,
);
}