mirror of
http://nostr-git-proxy.forgejo.svc.cluster.local/git/45387ca441053e230b2126802005eb03767ab59d84555e8bac86b6e7def14e27/myadhd-flutter
synced 2026-11-20 19:43:03 +00:00
23 lines
505 B
Dart
23 lines
505 B
Dart
class InboxItem {
|
|
final String id;
|
|
final String text;
|
|
final DateTime createdAt;
|
|
|
|
InboxItem({
|
|
required this.id,
|
|
required this.text,
|
|
required this.createdAt,
|
|
});
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'id': id,
|
|
'text': text,
|
|
'createdAt': createdAt.toIso8601String(),
|
|
};
|
|
|
|
factory InboxItem.fromJson(Map<String, dynamic> json) => InboxItem(
|
|
id: json['id'] as String,
|
|
text: json['text'] as String,
|
|
createdAt: DateTime.parse(json['createdAt'] as String),
|
|
);
|
|
}
|