LCUser class Null safety

LeanCloud User.

Inheritance

Constructors

LCUser()

Properties

acl LCACL?
Gets the ACL for this object.
read / write, inherited
authData Map?
read / write
className String?
The class name of the object. [...]
read-only, inherited
createdAt DateTime?
Gets the object's createdAt attribute.
read-only, inherited
email String?
read / write
emailVerified bool?
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
isAnonymous bool
Checks whether this user is anonymous.
read-only
mobile String?
read / write
mobileVerified bool?
read-only
objectId String?
Gets the object's objectId.
read-only, inherited
password String?
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sessionToken String?
read / write
updatedAt DateTime?
Gets the object's updatedAt attribute.
read-only, inherited
username String?
read / write

Methods

add(String key, dynamic value) → void
Atomically add value to the end of the array key.
inherited
addAll(String key, Iterable values) → void
Atomically add values to the end of the array key.
inherited
addAllUnique(String key, Iterable values) → void
Atomically add values to the array key, only if not already present. [...]
inherited
addRelation(String key, LCObject value) → void
Adds a relation value to key.
inherited
addUnique(String key, dynamic value) → void
Atomically add value to the array key, only if not already present. [...]
inherited
associateAuthData(Map<String, dynamic> authData, String platform) Future
Associates this LCUser with a third party authData.
associateAuthDataAndUnionId(Map<String, dynamic> authData, String platform, String unionId, {LCUserAuthDataLoginOption? option}) Future
Associates this user with a third party authData and unionId.
decrement(String key, num amount) → void
Atomically decrements the value of the given key with amount.
inherited
delete() Future
Deletes this object.
inherited
disassociateWithAuthData(String platform) Future
Unlinks a user from a third party platform.
fetch({Iterable<String>? keys, Iterable<String>? includes}) Future<LCObject>
Fetches the object from the cloud. [...]
inherited
follow(String targetId, {Map<String, dynamic>? attrs}) Future
Follows a user whose objectId is targetId.
followeeQuery() LCQuery<LCObject>
Constructs a followee query.
followerQuery() LCQuery<LCObject>
Constructs a follower query.
getFollowersAndFollowees({bool includeFollower = false, bool includeFollowee = false, bool returnCount = false}) Future<LCFollowersAndFollowees>
Queries followers and followees at the same time. [...]
increment(String key, num amount) → void
Atomically increments the value of the given key with amount.
inherited
isAuthenticated() Future<bool>
Checks whether the current sessionToken is valid.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
remove(String key, dynamic value) → void
Atomically remove all value from the array key.
inherited
removeAll(String key, Iterable values) → void
Atomically remove all values from the array key.
inherited
removeRelation(String key, LCObject value) → void
Removes relation value to key.
inherited
save({bool fetchWhenSave = false, LCQuery<LCObject>? query}) Future<LCUser>
Saves the object to the cloud. [...]
override
signUp() Future<LCUser>
Signs up a new user. [...]
toString() String
Serializes this LCObject to a JSON string.
inherited
unfollow(String targetId) Future
Unfollows a user whose objectId is targetId.
unset(String key) → void
Removes the key. [...]
inherited
updatePassword(String oldPassword, String newPassword) Future
Updates newPassword safely with oldPassword.

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited
operator [](String key) → dynamic
Gets the value of key.
inherited
operator []=(String key, dynamic value) → void
Sets key to value.
inherited

Static Methods

becomeWithSessionToken(String sessionToken) Future<LCUser>
Signs in a user with a sessionToken.
getCurrent() Future<LCUser?>
Retrieves the currently logged in LCUser with a valid session.
getQuery() LCQuery<LCUser>
Constructs a LCQuery for LCUser.
login(String username, String password) Future<LCUser>
Signs in a user with their username and password.
loginAnonymously() Future<LCUser>
Creates an anonymous user.
loginByEmail(String email, String password) Future<LCUser>
Signs in a user with their email and password.
loginByMobilePhoneNumber(String mobile, String password) Future<LCUser>
Signs in a user with their mobile number and password.
loginBySMSCode(String mobile, String code) Future<LCUser>
Signs in a LCUser with their mobile number and verification code.
loginWithAuthData(Map<String, dynamic> authData, String platform, {LCUserAuthDataLoginOption? option}) Future<LCUser>
Signs up or signs in a user with third party authData.
loginWithAuthDataAndUnionId(Map<String, dynamic> authData, String platform, String unionId, {LCUserAuthDataLoginOption? option}) Future<LCUser>
Signs up or signs in a user with third party authData and unionId.
logout() Future
Logs out the currently logged in user session.
requestEmailVerify(String email) Future
Requests a verification email to be sent to a user's email address.
requestLoginSMSCode(String mobile, {String? validateToken}) Future
Requests a login sms code to be sent to the mobile number of an existing user.
requestMobilePhoneVerify(String mobile) Future
Requests a verification SMS to be sent to a user's mobile number.
requestPasswordReset(String email) Future
Requests a password reset email to be sent to a user's email address.
requestPasswordRestBySmsCode(String mobile) Future
Requests a reset password sms code to be sent to a user's mobile number.
requestSMSCodeForUpdatingPhoneNumber(String mobile, {int ttl = 360, String? captchaToken}) Future
Requests an SMS code for updating phone number.
resetPasswordBySmsCode(String mobile, String code, String newPassword) Future
Resets a user's password via mobile phone.
signUpOrLoginByMobilePhone(String mobile, String code) Future<LCUser>
Signs up or signs in a LCUser with their mobile number and verification code.
verifyCodeForUpdatingPhoneNumber(String mobile, String code) Future
Verify code for updating phone number.
verifyMobilePhone(String mobile, String code) Future
Requests to verify a user's mobile number with sms code they received.

Constants

ClassName → const String
'_User'