User class

Constructors

User.new({String? id, UserObjectEnum? object, String? externalId, String? primaryEmailAddressId, String? primaryPhoneNumberId, String? primaryWeb3WalletId, String? username, String? firstName, String? lastName, String? profileImageUrl, String? imageUrl, 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<SchemasPasskey> passkeys = const [], bool? passwordEnabled, bool? twoFactorEnabled, bool? totpEnabled, bool? backupCodeEnabled, int? mfaEnabledAt, int? mfaDisabledAt, List externalAccounts = const [], List<SAMLAccount> samlAccounts = const [], int? lastSignInAt, bool? banned, bool? locked, int? lockoutExpiresInSeconds, int? verificationAttemptsRemaining, int? updatedAt, int? createdAt, bool? deleteSelfEnabled, bool? createOrganizationEnabled, int? createOrganizationsLimit, int? lastActiveAt, int? legalAcceptedAt})
Returns a new User instance.

Properties

backupCodeEnabled bool?
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
banned bool?
Flag to denote whether user is banned or not.
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
externalAccounts List
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?
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
id 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
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
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
passkeys List<SchemasPasskey>
getter/setter pair
passwordEnabled bool?
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
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?
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
twoFactorEnabled bool?
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
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.