Skip to content

Commit 29cb49a

Browse files
authored
Merge pull request #210 from pd4d10/patch-1
Add missing fields for Notification
2 parents c1e298c + d787a0a commit 29cb49a

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

lib/src/common/model/notifications.dart

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class Notification {
1414
this.unread,
1515
this.updatedAt,
1616
this.lastReadAt,
17+
this.url,
18+
this.subscriptionUrl,
1719
});
1820
final String id;
1921
final Repository repository;
@@ -27,16 +29,25 @@ class Notification {
2729
@JsonKey(name: 'last_read_at')
2830
final DateTime lastReadAt;
2931

32+
final String url;
33+
34+
@JsonKey(name: 'subscription_url')
35+
final String subscriptionUrl;
36+
3037
factory Notification.fromJson(Map<String, dynamic> input) =>
3138
_$NotificationFromJson(input);
3239
}
3340

3441
/// Model class for a notification subject.
3542
@JsonSerializable(createToJson: false)
3643
class NotificationSubject {
37-
NotificationSubject({this.title, this.type});
44+
NotificationSubject({this.title, this.type, this.url, this.latestCommentUrl});
3845
final String title;
3946
final String type;
47+
final String url;
48+
49+
@JsonKey(name: 'latest_comment_url')
50+
final String latestCommentUrl;
4051

4152
factory NotificationSubject.fromJson(Map<String, dynamic> input) =>
4253
_$NotificationSubjectFromJson(input);

lib/src/common/model/notifications.g.dart

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)