Account constructor

const Account({
  1. @JsonKey(name: 'id') String? id,
  2. @JsonKey(name: 'username') String? username,
  3. @JsonKey(name: 'acct') String? acct,
  4. @JsonKey(name: 'url') String? url,
  5. @JsonKey(name: 'display_name') String? displayName,
  6. @JsonKey(name: 'note') String? note,
  7. @JsonKey(name: 'avatar') String? avatar,
  8. @JsonKey(name: 'avatar_static') String? avatarStatic,
  9. @JsonKey(name: 'header') String? header,
  10. @JsonKey(name: 'header_static') String? headerStatic,
  11. @JsonKey(name: 'locked') bool? locked,
  12. @JsonKey(name: 'fields') List<AccountField>? fields,
  13. @JsonKey(name: 'emojis') List<CustomEmoji>? emojis,
  14. @JsonKey(name: 'bot') bool? bot,
  15. @JsonKey(name: 'group') bool? group,
  16. @JsonKey(name: 'discoverable') bool? discoverable,
  17. @JsonKey(name: 'noindex') bool? noindex,
  18. @JsonKey(name: 'moved') Account? moved,
  19. @JsonKey(name: 'suspended') bool? suspended,
  20. @JsonKey(name: 'limited') bool? limited,
  21. @JsonKey(name: 'created_at') DateTime? createdAt,
  22. @JsonKey(name: 'last_status_at') DateTime? lastStatusAt,
  23. @JsonKey(name: 'statuses_count') int? statusesCount,
  24. @JsonKey(name: 'followers_count') int? followersCount,
  25. @JsonKey(name: 'following_count') int? followingCount,
  26. @JsonKey(name: 'source') AccountSource? source,
  27. @JsonKey(name: 'role') Role? role,
  28. @JsonKey(name: 'roles') List<Role>? roles,
  29. @JsonKey(name: 'mute_expires_at') DateTime? muteExpiresAt,
})

Implementation

const factory Account({
  /// The account id.
  @JsonKey(name: 'id') final String? id,

  /// The username of the account, not including domain.
  @JsonKey(name: 'username') final String? username,

  /// The Webfinger account URI. Equal to `username` for local users, or
  /// `username@domain` for remote users.
  @JsonKey(name: 'acct') final String? acct,

  /// The location of the user's profile page.
  @JsonKey(name: 'url') final String? url,

  /// The profile's display name.
  @JsonKey(name: 'display_name') final String? displayName,

  /// The profile's bio or description.
  @JsonKey(name: 'note') final String? note,

  /// An image icon that is shown next to statuses and in the profile.
  @JsonKey(name: 'avatar') final String? avatar,

  /// A static version of the avatar. Equal to `avatar` if its value is a
  /// static image; different if `avatar` is an animated GIF.
  @JsonKey(name: 'avatar_static') final String? avatarStatic,

  /// An image banner that is shown above the profile and in profile cards.
  @JsonKey(name: 'header') final String? header,

  /// A static version of the header. Equal to `header` if its value is a
  /// static image; different if `header` is an animated GIF.
  @JsonKey(name: 'header_static') final String? headerStatic,

  /// Whether the account manually approves follow requests.
  @JsonKey(name: 'locked') final bool? locked,

  /// Additional metadata attached to a profile as name-value pairs.
  @JsonKey(name: 'fields') final List<AccountField>? fields,

  /// Additional metadata attached to a profile as name-value pairs.
  @JsonKey(name: 'emojis') final List<CustomEmoji>? emojis,

  /// Indicates that the account may perform automated actions, may not be
  /// monitored, or identifies as a robot.
  @JsonKey(name: 'bot') final bool? bot,

  /// Indicates that the account represents a Group actor.
  @JsonKey(name: 'group') final bool? group,

  /// Whether the account has opted into discovery features such as the
  /// profile directory.
  @JsonKey(name: 'discoverable') final bool? discoverable,

  /// Whether the local user has opted out of being indexed by search engines.
  @JsonKey(name: 'noindex') final bool? noindex,

  /// Indicates that the profile is currently inactive and that its user has
  /// moved to a new account.
  @JsonKey(name: 'moved') final Account? moved,

  /// An extra attribute returned only when an account is suspended.
  @JsonKey(name: 'suspended') final bool? suspended,

  /// An extra attribute returned only when an account is silenced. If true,
  /// indicates that the account should be hidden behind a warning screen.
  @JsonKey(name: 'limited') final bool? limited,

  /// When the account was created.
  @JsonKey(name: 'created_at') final DateTime? createdAt,

  /// When the most recent status was posted.
  @JsonKey(name: 'last_status_at') final DateTime? lastStatusAt,

  /// How many statuses are attached to this account.
  @JsonKey(name: 'statuses_count') final int? statusesCount,

  /// The reported followers of this profile.
  @JsonKey(name: 'followers_count') final int? followersCount,

  /// The reported follows of this profile.
  @JsonKey(name: 'following_count') final int? followingCount,

  /// An extra attribute that contains source values to be used with API
  /// methods that verify credentials and update credentials.
  @JsonKey(name: 'source') final AccountSource? source,

  /// The role assigned to the currently authorized user.
  @JsonKey(name: 'role') final Role? role,

  /// The roles assigned to the currently authorized user.
  @JsonKey(name: 'roles') final List<Role>? roles,

  /// When a timed mute will expire, if applicable.
  @JsonKey(name: 'mute_expires_at') final DateTime? muteExpiresAt,
}) = _Account;