User class

Constructors

User({required String id, required UserObjectEnum object, required String? externalId, required String? primaryEmailAddressId, required String? primaryPhoneNumberId, required String? primaryWeb3WalletId, required String? username, required String? firstName, required String? lastName, String? locale, String? profileImageUrl, String? imageUrl, required bool hasImage, Map<String, Object> publicMetadata = const {}, Map<String, Object>? privateMetadata = const {}, Map<String, Object> unsafeMetadata = const {}, List<EmailAddress> emailAddresses = const [], List<PhoneNumber> phoneNumbers = const [], List<Web3Wallet> web3Wallets = const [], List<Passkey> passkeys = const [], required bool passwordEnabled, required bool twoFactorEnabled, required bool totpEnabled, required bool backupCodeEnabled, required int? mfaEnabledAt, required int? mfaDisabledAt, int? passwordLastUpdatedAt, List<ExternalAccountWithVerification> externalAccounts = const [], List<SAMLAccount> samlAccounts = const [], List<EnterpriseAccount> enterpriseAccounts = const [], List<OrganizationMembership> organizationMemberships = const [], required int? lastSignInAt, required bool banned, required bool locked, required int? lockoutExpiresInSeconds, required int? verificationAttemptsRemaining, required int updatedAt, required int createdAt, required bool deleteSelfEnabled, required bool createOrganizationEnabled, int? createOrganizationsLimit, required int? lastActiveAt, required int? legalAcceptedAt, bool bypassClientTrust = false})
Returns a new User instance.

Properties

backupCodeEnabled bool
getter/setter pair
banned bool
Flag to denote whether user is banned or not.
getter/setter pair
bypassClientTrust bool
When set to true, the user will bypass client trust checks during sign-in.
getter/setter pair
createdAt int
Unix timestamp of creation.
getter/setter pair
createOrganizationEnabled bool
If enabled, user can create organizations via FAPI.
getter/setter pair
createOrganizationsLimit int?
The maximum number of organizations the user can create. 0 means unlimited.
getter/setter pair
deleteSelfEnabled bool
If enabled, user can delete themselves via FAPI.
getter/setter pair
emailAddresses List<EmailAddress>
getter/setter pair
enterpriseAccounts List<EnterpriseAccount>
getter/setter pair
externalAccounts List<ExternalAccountWithVerification>
getter/setter pair
externalId String?
getter/setter pair
firstName String?
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
hasImage bool
getter/setter pair
id String
getter/setter pair
imageUrl String?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
lastActiveAt int?
Unix timestamp of the latest session activity, with day precision.
getter/setter pair
lastName String?
getter/setter pair
lastSignInAt int?
Unix timestamp of last sign-in.
getter/setter pair
legalAcceptedAt int?
Unix timestamp of when the user accepted the legal requirements.
getter/setter pair
locale String?
getter/setter pair
locked bool
Flag to denote whether user is currently locked, i.e. restricted from signing in or not.
getter/setter pair
lockoutExpiresInSeconds int?
The number of seconds remaining until the lockout period expires for a locked user. A null value for a locked user indicates that lockout never expires.
getter/setter pair
mfaDisabledAt int?
Unix timestamp of when MFA was last disabled for this user. It should be noted that this field is not nullified if MFA is enabled again.
getter/setter pair
mfaEnabledAt int?
Unix timestamp of when MFA was last enabled for this user. It should be noted that this field is not nullified if MFA is disabled.
getter/setter pair
object UserObjectEnum
String representing the object's type. Objects of the same type share the same value.
getter/setter pair
organizationMemberships List<OrganizationMembership>
getter/setter pair
passkeys List<Passkey>
getter/setter pair
passwordEnabled bool
getter/setter pair
passwordLastUpdatedAt int?
Unix timestamp of when the user's password was last updated.
getter/setter pair
phoneNumbers List<PhoneNumber>
getter/setter pair
primaryEmailAddressId String?
getter/setter pair
primaryPhoneNumberId String?
getter/setter pair
primaryWeb3WalletId String?
getter/setter pair
privateMetadata Map<String, Object>?
getter/setter pair
profileImageUrl String?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
publicMetadata Map<String, Object>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
samlAccounts List<SAMLAccount>
getter/setter pair
totpEnabled bool
getter/setter pair
twoFactorEnabled bool
getter/setter pair
unsafeMetadata Map<String, Object>
getter/setter pair
updatedAt int
Unix timestamp of last update.
getter/setter pair
username String?
getter/setter pair
verificationAttemptsRemaining int?
The number of verification attempts remaining until the user is locked. Null if account lockout is not enabled. Note: if a user is locked explicitly via the Backend API, they may still have verification attempts remaining.
getter/setter pair
web3Wallets List<Web3Wallet>
getter/setter pair

Methods

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

Operators

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

Static Methods

fromJson(dynamic value) User?
Returns a new User instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) List<User>
mapFromJson(dynamic json) Map<String, User>
mapListFromJson(dynamic json, {bool growable = false}) Map<String, List<User>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.