Feed stream with changenotifier
This commit is contained in:
16
lib/models/feed_item.dart
Normal file
16
lib/models/feed_item.dart
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user