PostRecord constructor
- @JsonSerializable(includeIfNull: false)
const
PostRecord(
{ - @Default(appBskyFeedPost) @JsonKey(name: r'$type') String $type,
- required String text,
- @FacetConverter() List<Facet>? facets,
- @ReplyRefConverter() ReplyRef? reply,
- @UPostEmbedConverter() UPostEmbed? embed,
- List<String>? langs,
- @UPostLabelConverter() UPostLabel? labels,
- List<String>? tags,
- required DateTime createdAt,
- @JsonKey(name: r'$unknown') Map<String, dynamic>? $unknown,
})
Implementation
@JsonSerializable(includeIfNull: false)
const factory PostRecord({
/// The unique namespace for this lex object.
///
/// `app.bsky.feed.post`
@Default(appBskyFeedPost) @JsonKey(name: r'$type') String $type,
/// The primary post content. May be an empty string, if there are
/// embeds.
required String text,
/// Annotations of text (mentions, URLs, hashtags, etc)
@FacetConverter() List<Facet>? facets,
@ReplyRefConverter() ReplyRef? reply,
@UPostEmbedConverter() UPostEmbed? embed,
/// Indicates human language of post primary text content.
List<String>? langs,
/// Self-label values for this post. Effectively content warnings.
@UPostLabelConverter() UPostLabel? labels,
/// Additional hashtags, in addition to any included in post text and
/// facets.
List<String>? tags,
/// Client-declared timestamp when this post was originally created.
required DateTime createdAt,
/// Contains unknown objects not defined in Lexicon.
@JsonKey(name: r'$unknown') Map<String, dynamic>? $unknown,
}) = _PostRecord;