Notification constructor
- @JsonSerializable(includeIfNull: false)
const
Notification(
{ - @Default(appBskyNotificationListNotificationsNotification) @JsonKey(name: r'$type') String $type,
- @AtUriConverter() required AtUri uri,
- required String cid,
- @ProfileViewConverter() required ProfileView author,
- @UNotificationReasonConverter() required UNotificationReason reason,
- @AtUriConverter() AtUri? reasonSubject,
- required Map<String, dynamic> record,
- required bool isRead,
- required DateTime indexedAt,
- @LabelConverter() List<Label>? labels,
- @JsonKey(name: r'$unknown') Map<String, dynamic>? $unknown,
})
Implementation
@JsonSerializable(includeIfNull: false)
const factory Notification({
/// The unique namespace for this lex object.
///
/// `app.bsky.notification.listNotifications#notification`
@Default(appBskyNotificationListNotificationsNotification)
@JsonKey(name: r'$type')
String $type,
@AtUriConverter() required AtUri uri,
required String cid,
@ProfileViewConverter() required ProfileView author,
/// Expected values are 'like', 'repost', 'follow', 'mention',
/// 'reply', 'quote', and 'starterpack-joined'.
@UNotificationReasonConverter() required UNotificationReason reason,
@AtUriConverter() AtUri? reasonSubject,
required Map<String, dynamic> record,
required bool isRead,
required DateTime indexedAt,
@LabelConverter() List<Label>? labels,
/// Contains unknown objects not defined in Lexicon.
@JsonKey(name: r'$unknown') Map<String, dynamic>? $unknown,
}) = _Notification;