Feed stream with changenotifier

This commit is contained in:
SomnusVeritas
2023-10-20 21:13:49 +02:00
parent f849a42cf9
commit 8c1254ee1a
5 changed files with 82 additions and 1 deletions

16
lib/models/feed_item.dart Normal file
View File

@@ -0,0 +1,16 @@
class FeedItem {
final String text;
final DateTime timestamp;
FeedItem.fromMap(Map<String, dynamic> map)
: text = map['text'],
timestamp = DateTime.parse(map['timestamp']);
@override
bool operator ==(Object other) {
if (other is FeedItem) {
return other.timestamp == timestamp;
}
return false;
}
}