Account class

Represents a user of Mastodon and their associated profile.

Annotations
  • @freezed

Constructors

Account({@JsonKey(name: 'id') String? id, @JsonKey(name: 'username') String? username, @JsonKey(name: 'acct') String? acct, @JsonKey(name: 'url') String? url, @JsonKey(name: 'display_name') String? displayName, @JsonKey(name: 'note') String? note, @JsonKey(name: 'avatar') String? avatar, @JsonKey(name: 'avatar_static') String? avatarStatic, @JsonKey(name: 'header') String? header, @JsonKey(name: 'header_static') String? headerStatic, @JsonKey(name: 'locked') bool? locked, @JsonKey(name: 'fields') List<AccountField>? fields, @JsonKey(name: 'emojis') List<CustomEmoji>? emojis, @JsonKey(name: 'bot') bool? bot, @JsonKey(name: 'group') bool? group, @JsonKey(name: 'discoverable') bool? discoverable, @JsonKey(name: 'noindex') bool? noindex, @JsonKey(name: 'moved') Account? moved, @JsonKey(name: 'suspended') bool? suspended, @JsonKey(name: 'limited') bool? limited, @JsonKey(name: 'created_at') DateTime? createdAt, @JsonKey(name: 'last_status_at') DateTime? lastStatusAt, @JsonKey(name: 'statuses_count') int? statusesCount, @JsonKey(name: 'followers_count') int? followersCount, @JsonKey(name: 'following_count') int? followingCount, @JsonKey(name: 'source') AccountSource? source, @JsonKey(name: 'role') Role? role, @JsonKey(name: 'roles') List<Role>? roles, @JsonKey(name: 'mute_expires_at') DateTime? muteExpiresAt})
const
factory
Account.fromJson(Map<String, dynamic> json)
factory

Properties

acct String?
The Webfinger account URI. Equal to username for local users, or username@domain for remote users.
no setterinherited
avatar String?
An image icon that is shown next to statuses and in the profile.
no setterinherited
avatarStatic String?
A static version of the avatar. Equal to avatar if its value is a static image; different if avatar is an animated GIF.
no setterinherited
bot bool?
Indicates that the account may perform automated actions, may not be monitored, or identifies as a robot.
no setterinherited
copyWith → $AccountCopyWith<Account>
Create a copy of Account with the given fields replaced by the non-null parameter values.
no setterinherited
createdAt DateTime?
When the account was created.
no setterinherited
discoverable bool?
Whether the account has opted into discovery features such as the profile directory.
no setterinherited
displayName String?
The profile's display name.
no setterinherited
emojis List<CustomEmoji>?
Additional metadata attached to a profile as name-value pairs.
no setterinherited
fields List<AccountField>?
Additional metadata attached to a profile as name-value pairs.
no setterinherited
followersCount int?
The reported followers of this profile.
no setterinherited
followingCount int?
The reported follows of this profile.
no setterinherited
group bool?
Indicates that the account represents a Group actor.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
An image banner that is shown above the profile and in profile cards.
no setterinherited
headerStatic String?
A static version of the header. Equal to header if its value is a static image; different if header is an animated GIF.
no setterinherited
id String?
The account id.
no setterinherited
lastStatusAt DateTime?
When the most recent status was posted.
no setterinherited
limited bool?
An extra attribute returned only when an account is silenced. If true, indicates that the account should be hidden behind a warning screen.
no setterinherited
locked bool?
Whether the account manually approves follow requests.
no setterinherited
moved Account?
Indicates that the profile is currently inactive and that its user has moved to a new account.
no setterinherited
muteExpiresAt DateTime?
When a timed mute will expire, if applicable.
no setterinherited
noindex bool?
Whether the local user has opted out of being indexed by search engines.
no setterinherited
note String?
The profile's bio or description.
no setterinherited
role Role?
The role assigned to the currently authorized user.
no setterinherited
roles List<Role>?
The roles assigned to the currently authorized user.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source AccountSource?
An extra attribute that contains source values to be used with API methods that verify credentials and update credentials.
no setterinherited
statusesCount int?
How many statuses are attached to this account.
no setterinherited
suspended bool?
An extra attribute returned only when an account is suspended.
no setterinherited
url String?
The location of the user's profile page.
no setterinherited
username String?
The username of the account, not including domain.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this Account to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited