Skip to content

Account

Uniquely identifies an account and its associated identity.

The identity is what a participant logs in with, e.g., an EmailAccountIdentity.

Annotations

Constructors

Account.fromJson

Account.fromJson(
  1. Map<String, dynamic> json
)

Account

Account({
  1. String? id,
  2. required AccountIdentity identity,
})

Account.withEmailIdentity

Account.withEmailIdentity(
  1. String emailAddress
)

Create a new Account uniquely identified by the specified emailAddress.

Account.withUsernameIdentity

Account.withUsernameIdentity(
  1. String username
)

Create a new Account uniquely identified by the specified username.

Properties

id

String id
getter/setter pair

Unique id of this account. A random UUID (v4) if not specified.

identity

AccountIdentity identity
getter/setter pair

Identity associated with this account.

Methods

hasSameIdentity

bool hasSameIdentity(
  1. Account otherAccount
)

Determines whether this account has the same identity as otherAccount.

toJson

Map<String, dynamic> toJson()