ParseSession class
The ParseSession is a local representation of session data that can be saved and retrieved from the Parse cloud.
- Inheritance
-
- Object
- ParseObject
- ParseSession
Constructors
- ParseSession({String? objectId, dynamic json})
- ParseSession.fromJson({dynamic json})
-
factory
Properties
- action → String
-
action
could have values:login
,signup
,create
, orupgrade
. The create action is when the developer manually creates the session by saving aSession
object. Theupgrade
action is when the user is upgraded to revocable session from a legacy session token.no setter - asMap → dynamic
-
Return
Map<String, dynamic>
of complete data objectno setterinherited - asPointer → dynamic
-
Return
Map<String, dynamic>
of pointer objectno setterinherited - authProvider → String
-
authProvider
could have values:password
,anonymous
,facebook
, ortwitter
.no setter - className → String
-
Accessor to the class name.
finalinherited
- copy → ParseObject
-
Return the copy of this instance
no setterinherited
- createdAt → DateTime?
-
This reports time as the server sees it, so that if you create a ParseObject, then wait a
while, and then call save, the creation time will be the time of the first
save call rather than the time the object was created locally.
no setterinherited
-
createdWith
→ Map<
String, dynamic> ? -
createdWith
(readonly): Information about how this session was createdno setter - expiresAt → DateTime?
-
Return the expires time of session
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isComplete → bool
-
Return true if this object already fetched
no setterinherited
- isDeleted → bool
-
Return true if this is already deleted
no setterinherited
- 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.
no setterinherited
-
operations
→ Map<
String, dynamic> -
no setterinherited
- path → String
-
no setteroverride
- restricted → bool?
-
Return true if session is restricted, false otherwise
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionToken → String?
-
Return the session token
no setter
- 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 save, the updated time will be the time of the
save call rather than the time the object was changed locally.
no setterinherited
- user → ParseUser?
-
Return the ParseUser of this session
no setter
Methods
-
add(
String key, dynamic value) → void -
Atomically adds an object to the end of the array associated with a given key.
inherited
-
addAll(
String key, List values) → void -
Atomically adds the objects contained in a List to the end of the array
associated with a given key.
inherited
-
addAllUnique(
String key, List values) → void -
Atomically adds the objects contained in a List to the array associated with a
given key, only adding elements which are not already present in the array. The position of the
insert is not guaranteed.
inherited
-
addUnique(
String key, dynamic value) → void -
Atomically adds an object to the array associated with a given key, only if it is not already
present in the array. The position of the insert is not guaranteed.
inherited
-
decrement(
dynamic key, {int by = -1}) → void -
Atomically decrements the given key by the given number.
inherited
-
delete(
{bool useMasterKey = false}) → Future< void> -
Deletes this object on the server.
inherited
-
fetch(
{List< String> ? includes, bool useMasterKey = false}) → Future<ParseObject> -
Fetches this object with the data from the server.
inherited
-
fetchIfNeeded(
{bool useMasterKey = false}) → Future< ParseObject> -
If this
ParseObject
has not been fetched (i.e. isComplete returnsfalse
), fetches this object with the data from the server.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<
T> (String key) → List< T> ? -
Access a List value.
inherited
-
getMap<
T> (String key) → Map< String, T> ? -
Access a Map value.
inherited
-
getNumber(
String key) → num? -
Access a num value.
inherited
-
getParseACL(
) → ParseACL? -
Access a ParseACL 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
-
getParseRole(
String key) → ParseRole? -
Access a ParseRole value.
inherited
-
getParseUser(
String key) → ParseUser? -
Access a ParseUser value.
inherited
-
getString(
String key) → String? -
Access a String value.
inherited
-
increment(
dynamic key, {int by = 1}) → void -
Atomically increments the given key by the given number.
inherited
-
isKeyMutable(
String key) → bool -
inherited
-
mergeJson(
dynamic json, {bool fromFetch = false}) → void -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String key) → void -
Removes a key from this object's data if it exists.
inherited
-
removeAll(
String key, List values) → void -
Atomically removes all instances of the objects contained in a List from the
array associated with a given key.
inherited
-
save(
{bool useMasterKey = false}) → Future< ParseObject> -
Saves this object to the server.
inherited
-
set(
String key, dynamic value) → void -
Add a key-value pair to this object. It is recommended to name keys in
camelCaseLikeThis
.inherited -
setACL(
ParseACL acl) → void -
Setup ParseACL into this object
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
uploadFiles(
) → Future< void> -
Uploading ParseFile's when there is any file to upload
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
me(
) → Future< ParseSession> - Get the current logged ParseUser session