StatusEdit constructor

  1. @JsonSerializable(includeIfNull: false)
const StatusEdit({
  1. required String content,
  2. required String spoilerText,
  3. required Account account,
  4. Poll? poll,
  5. required List<MediaAttachment> mediaAttachments,
  6. required List<Emoji> emojis,
  7. @JsonKey(name: 'sensitive') required bool isSensitive,
  8. required DateTime createdAt,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory StatusEdit({
  /// The content of the status at this revision.
  required String content,

  /// The content of the subject or content warning at this revision.
  required String spoilerText,

  /// The account that published this revision.
  required Account account,

  /// The current state of the poll options at this revision.
  ///
  /// Note that edits changing the poll options will be collapsed together
  /// into one edit, since this action resets the poll.
  Poll? poll,

  /// The current state of the poll options at this revision.
  ///
  /// Note that edits changing the poll options will be collapsed together
  /// into one edit, since this action resets the poll.
  required List<MediaAttachment> mediaAttachments,

  /// Any custom emoji that are used in the current revision.
  required List<Emoji> emojis,

  /// Whether the status was marked sensitive at this revision.
  @JsonKey(name: 'sensitive') required bool isSensitive,

  /// The timestamp of when the revision was published.
  required DateTime createdAt,
}) = _StatusEdit;