Activity class Null safety

Presence is game or activity which user is playing/user participate. Can be game, eg. Dota 2, VS Code or activity like Listening to song on Spotify.


Activity.of(String name, {ActivityType type =, String? url})
Makes a new game object.


activityFlags int?
Activity flags ORd together, describes what the payload includes
read / write
applicationId Snowflake?
Application id for the game
read / write
assets GameAssets?
Images for the presence and their hover texts
read / write
createdAt DateTime
Timestamp of when the activity was added to the user's session
read / write, final, late
customStatusEmoji ActivityEmoji?
The emoji used for a custom status
read / write
details String?
What the player is currently doing
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
instance bool?
Whether or not the activity is an instanced game session
read / write
name String
The activity name.
read / write, final, late
party ActivityParty?
Information for the current party of the player
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
secrets GameSecrets?
Secrets for Rich Presence joining and spectating
read / write
state String?
The user's current party status
read / write
timestamps ActivityTimestamps?
Timestamps for start and/or end of the game
read / write
type ActivityType
The activity type.
read / write, final, late
url String?
The game URL, if provided.
read / write


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]