Grain flutter app
1import 'package:freezed_annotation/freezed_annotation.dart';
2
3import 'comment.dart';
4import 'gallery.dart';
5import 'profile.dart';
6
7part 'notification.freezed.dart';
8part 'notification.g.dart';
9
10@freezed
11class Notification with _$Notification {
12 const factory Notification({
13 required String uri,
14 required String cid,
15 required Profile author,
16 required Map<String, dynamic> record,
17 required String reason,
18 Gallery? reasonSubjectGallery,
19 Profile? reasonSubjectProfile,
20 Comment? reasonSubjectComment,
21 required bool isRead,
22 required String indexedAt,
23 }) = _Notification;
24
25 factory Notification.fromJson(Map<String, dynamic> json) => _$NotificationFromJson(json);
26}