ParseUser class
The ParseUser is a local representation of user data that can be saved and retrieved from the Parse cloud.
- Inheritance
- Object
- ParseObject
- ParseUser
Constructors
Properties
- email ↔ String
-
Retrieves the email address.
read / write
- password ← String
-
Sets the password.
write-only
- username ↔ String
-
Retrieves the username.
read / write
- className → String
-
final, inherited
- createdAt → DateTime
-
This reports time as the server sees it, so that if you create a ParseObject, then wait a
while, and then call saveInBackground, the creation time will be the time of the first
saveInBackground call rather than the time the object was created locally.
read-only, inherited
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- objectId → String
-
Accessor to the object id. An object id is assigned as soon as an object is saved to the
server. The combination of a className and an objectId uniquely identifies an object in your
application.
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
-
selectedKeys
→ List<
String> -
read-only, inherited
- updatedAt → DateTime
-
This reports time as the server sees it, so that if you make changes to a ParseObject, then
wait a while, and then call saveInBackground, the updated time will be the time of the
saveInBackground call rather than the time the object was changed locally.
read-only, inherited
Methods
-
register(
) → Future< ParseUser> - Signs up a new user. You should call this instead of saveInBackground() for new ParseUsers. This will create a new ParseUser on the server, and also persist the session on disk so that you can access the user using currentUser. [...]
-
deleteEventually(
) → Future< void> -
Deletes this object from the server at some unspecified time in the future, even if Parse is
currently inaccessible. Use this when you may not have a solid network connection, and don't
need to know when the delete completes. If there is some problem with the object such that it
can't be deleted, the request will be silently discarded. Delete requests made with this method
will be stored locally in an on-disk cache until they can be transmitted to Parse. They will be
sent immediately if possible. Otherwise, they will be sent the next time a network connection
is available. Delete instructions saved this way will persist even after the app is closed, in
which case they will be sent the next time the app is opened. If more than 10MB of commands are
waiting to be sent, subsequent calls to deleteEventually or
saveEventually will cause old instructions to be silently discarded until the
connection can be re-established, and the queued objects can be saved.
inherited
-
deleteInBackground(
) → Future< void> -
Deletes this object on the server in a background thread.
inherited
-
fetchInBackground(
) → Future< ParseObject> -
Fetches this object with the data from the server in a background thread. [...]
inherited
-
get(
String key) → dynamic -
Access a value. In most cases it is more convenient to use a helper function such as
getString or getInteger. [...]
inherited
-
getBoolean(
String key) → bool -
Access a
bool
value. [...]inherited -
getDateTime(
String key) → DateTime -
Access a
DateTime
value. [...]inherited -
getDouble(
String key) → double -
Access a
double
value. [...]inherited -
getInteger(
String key) → int -
Access an
int
value. [...]inherited -
getList(
String key) → List -
Access a
List
value. [...]inherited -
getMap(
String key) → Map< String, dynamic> -
Access a
Map
value. [...]inherited -
getNumber(
String key) → num -
Access a
num
value. [...]inherited -
getParseFile(
String key) → ParseFile -
Access a ParseFile value. [...]
inherited
-
getParseGeoPoint(
String key) → ParseGeoPoint -
Access a ParseGeoPoint value. [...]
inherited
-
getParseObject(
String key) → ParseObject -
Access a ParseObject value. [...]
inherited
-
getString(
String key) → String -
Access a
String
value. [...]inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
saveEventually(
) → Future< ParseObject> -
Saves this object to the server in a background thread. [...]
inherited
-
saveInBackground(
) → Future< ParseObject> -
Saves this object to the server in a background thread. [...]
inherited
-
set(
String key, dynamic value) → void -
Add a key-value pair to this object. It is recommended to name keys in
camelCaseLikeThis
.inherited -
toJson(
{bool withData: true }) → dynamic -
Converts this ParseObject into Map
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited
Static Properties
-
currentUser
→ Future<
ParseUser> -
This retrieves the currently logged in ParseUser with a valid session, either from memory or
disk if necessary.
read-only
-
query
→ ParseQuery<
ParseUser> -
Constructs a query for {@code ParseUser}.
read-only
Static Methods
-
logIn(
{String username, String password }) → Future< ParseUser> - Logs in a user with a username and password. On success, this saves the session to disk, so you can retrieve the currently logged in user using currentUser.
-
logOut(
) → Future< void> -
Logs out the currently logged in user session. This will remove the session from disk, log out
of linked services, and future calls to currentUser will return
null
.
Constants
- keyAuthData → const String
-
"authData"
- keyEmail → const String
-
"email"
- keyParseClassName → const String
-
"_User"
- keyPassword → const String
-
"password"
- keyUsername → const String
-
"username"