Status constructor

  1. @JsonSerializable(includeIfNull: false)
const Status({
  1. required String id,
  2. String? url,
  3. required String uri,
  4. required String content,
  5. required String spoilerText,
  6. required Visibility visibility,
  7. required int favouritesCount,
  8. required int repliesCount,
  9. required int reblogsCount,
  10. Language? language,
  11. String? inReplyToId,
  12. String? inReplyToAccountId,
  13. @JsonKey(name: 'favourited') bool? isFavourited,
  14. @JsonKey(name: 'reblogged') bool? isReblogged,
  15. @JsonKey(name: 'muted') bool? isMuted,
  16. @JsonKey(name: 'bookmarked') bool? isBookmarked,
  17. @JsonKey(name: 'sensitive') bool? isSensitive,
  18. @JsonKey(name: 'pinned') bool? isPinned,
  19. DateTime? lastStatusAt,
  20. required Account account,
  21. Application? application,
  22. Poll? poll,
  23. Status? reblog,
  24. required List<MediaAttachment> mediaAttachments,
  25. required List<Emoji> emojis,
  26. required List<Tag> tags,
  27. required DateTime createdAt,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory Status({
  /// ID of the status in the database.
  required String id,

  /// A link to the status's HTML representation.
  String? url,

  /// URI of the status used for federation.
  required String uri,

  /// HTML-encoded status content.
  required String content,

  /// Subject or summary line, below which status content is collapsed until
  /// expanded.
  required String spoilerText,

  /// Visibility of this status.
  required Visibility visibility,

  /// How many favourites this status has received.
  required int favouritesCount,

  /// How many replies this status has received.
  required int repliesCount,

  /// How many boosts this status has received.
  required int reblogsCount,

  /// Primary language of this status.
  Language? language,

  /// ID of the status being replied.
  String? inReplyToId,

  /// ID of the account being replied to.
  String? inReplyToAccountId,

  /// Have you favourited this status?
  @JsonKey(name: 'favourited') bool? isFavourited,

  /// Have you boosted this status?
  @JsonKey(name: 'reblogged') bool? isReblogged,

  /// Have you muted notifications for this status's conversation?
  @JsonKey(name: 'muted') bool? isMuted,

  /// Have you bookmarked this status?
  @JsonKey(name: 'bookmarked') bool? isBookmarked,

  /// Is this status marked as sensitive content?
  @JsonKey(name: 'sensitive') bool? isSensitive,

  /// Have you pinned this status?
  @JsonKey(name: 'pinned') bool? isPinned,

  /// The time and date the last status was posted at.
  DateTime? lastStatusAt,

  /// The account that authored this status.
  required Account account,

  /// The application used to post this status.
  Application? application,

  /// The poll attached to the status.
  Poll? poll,

  /// The status being reblogged.
  Status? reblog,

  /// Media that is attached to this status.
  required List<MediaAttachment> mediaAttachments,

  /// Custom emoji to be used when rendering status content.
  required List<Emoji> emojis,

  /// Hashtags used within the status content.
  required List<Tag> tags,

  /// The date when this status was created.
  required DateTime createdAt,
}) = _Status;