Notification constructor
const
Notification({
- @Default.new('app.bsky.notification.listNotifications#notification') String $type,
- @AtUriConverter.new() required AtUri uri,
- required String cid,
- @ProfileViewConverter() required ProfileView author,
- @NotificationReasonConverter() required NotificationReason reason,
- @AtUriConverter.new() AtUri? reasonSubject,
- required Map<
String, dynamic> record, - required bool isRead,
- @JsonKey.new(toJson: iso8601) required DateTime indexedAt,
- @LabelConverter() List<
Label> ? labels, - Map<
String, dynamic> ? $unknown,
Implementation
@JsonSerializable(includeIfNull: false)
const factory Notification({
@Default('app.bsky.notification.listNotifications#notification')
String $type,
@AtUriConverter() required AtUri uri,
required String cid,
@ProfileViewConverter() required ProfileView author,
/// The reason why this notification was delivered - e.g. your post was liked, or you received a new follower.
@NotificationReasonConverter() required NotificationReason reason,
@AtUriConverter() AtUri? reasonSubject,
required Map<String, dynamic> record,
required bool isRead,
@JsonKey(toJson: iso8601) required DateTime indexedAt,
@LabelConverter() List<Label>? labels,
Map<String, dynamic>? $unknown,
}) = _Notification;