MessageView constructor

  1. @JsonSerializable(includeIfNull: false)
const MessageView({
  1. @Default(chatBskyConvoDefsMessageView) @JsonKey(name: r'$type') String $type,
  2. required String id,
  3. required String rev,
  4. required String text,
  5. @FacetConverter() List<Facet>? facets,
  6. @UMessageViewEmbedConverter() UMessageViewEmbed? embed,
  7. @MessageViewSenderConverter() required MessageViewSender sender,
  8. required DateTime sentAt,
  9. @JsonKey(name: r'$unknown') Map<String, dynamic>? $unknown,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory MessageView({
  /// The unique namespace for this lex object.
  ///
  /// `chat.bsky.convo.defs#messageView`
  @Default(chatBskyConvoDefsMessageView)
  @JsonKey(name: r'$type')
  String $type,
  required String id,
  required String rev,
  required String text,

  /// Annotations of text (mentions, URLs, hashtags, etc)
  @FacetConverter() List<Facet>? facets,
  @UMessageViewEmbedConverter() UMessageViewEmbed? embed,
  @MessageViewSenderConverter() required MessageViewSender sender,
  required DateTime sentAt,

  /// Contains unknown objects not defined in Lexicon.
  @JsonKey(name: r'$unknown') Map<String, dynamic>? $unknown,
}) = _MessageView;