PostView constructor
const
PostView({
- @Default.new('app.bsky.feed.defs#postView') String $type,
- @AtUriConverter.new() required AtUri uri,
- required String cid,
- @ProfileViewBasicConverter() required ProfileViewBasic author,
- required Map<
String, dynamic> record, - @UPostViewEmbedConverter() UPostViewEmbed? embed,
- int? bookmarkCount,
- int? replyCount,
- int? repostCount,
- int? likeCount,
- int? quoteCount,
- int? viewCount,
- @JsonKey.new(toJson: iso8601) required DateTime indexedAt,
- @JsonKey.new(toJson: iso8601) DateTime? editedAt,
- @ViewerStateConverter() ViewerState? viewer,
- @LabelConverter() List<
Label> ? labels, - @ThreadgateViewConverter() ThreadgateView? threadgate,
- Map<
String, dynamic> ? debug, - Map<
String, dynamic> ? $unknown,
Implementation
@JsonSerializable(includeIfNull: false)
const factory PostView({
@Default('app.bsky.feed.defs#postView') String $type,
@AtUriConverter() required AtUri uri,
required String cid,
@ProfileViewBasicConverter() required ProfileViewBasic author,
required Map<String, dynamic> record,
@UPostViewEmbedConverter() UPostViewEmbed? embed,
int? bookmarkCount,
int? replyCount,
int? repostCount,
int? likeCount,
int? quoteCount,
/// Approximate number of times the post has been viewed. Only included in authenticated responses to the post's author when eligible to see the count. Counts less than 100 are omitted.
int? viewCount,
@JsonKey(toJson: iso8601) required DateTime indexedAt,
/// Present if the post has been edited. Timestamp when the version of the post in this view was indexed. indexedAt is unchanged by edits.
@JsonKey(toJson: iso8601) DateTime? editedAt,
@ViewerStateConverter() ViewerState? viewer,
@LabelConverter() List<Label>? labels,
@ThreadgateViewConverter() ThreadgateView? threadgate,
Map<String, dynamic>? debug,
Map<String, dynamic>? $unknown,
}) = _PostView;