DiscordActivity class
Constructors
-
DiscordActivity({required String name, required int type, String? url, required int createdAt, DiscordActivityTimestamps? timestamps, DiscordSnowflake? applicationId, String? details, String? state, DiscordEmoji? emoji, DiscordActivityParty? party, DiscordActivityAssets? assets, DiscordActivitySecrets? secrets, bool? instance, int? flags, List<
DiscordActivityButton> ? buttons}) -
DiscordActivity.fromJson(Map<
String, dynamic> json) -
factory
Properties
- applicationId → DiscordSnowflake?
-
application id of the game
final
- assets → DiscordActivityAssets?
-
images for the presence and their hover texts
final
-
the custom buttons shown in the Rich Presence (max 2)
final
- createdAt → int
-
unix timestamp (in milliseconds) of when the activity
was added to the user's session
final
- createdAtAsDateTime → DateTime?
-
no setter
- details → String?
-
what the player is currently doing
final
- emoji → DiscordEmoji?
-
the emoji used for a custom status
final
- flags → int?
-
activity flags OR'd together, describes what the payload includes
final
-
flagsAsEnum
→ List<
DiscordActivityFlag> ? -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- instance → bool?
-
whether or not the activity is an instanced game session
final
- name → String
-
the activity's name
final
- party → DiscordActivityParty?
-
information for the current party of the player
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secrets → DiscordActivitySecrets?
-
secrets for Rich Presence joining and spectating
final
- state → String?
-
the user's current party status
final
- timestamps → DiscordActivityTimestamps?
-
unix timestamps for start and/or end of the game
final
- type → int
-
activity type
final
- typeAsEnum → DiscordActivityType
-
no setter
- url → String?
-
stream url, is validated when type is 1 (Streaming)
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- applicationIdEntry → const String
- assetsEntry → const String
- createdAtEntry → const String
- detailsEntry → const String
- emojiEntry → const String
- flagsEntry → const String
- instanceEntry → const String
- nameEntry → const String
- partyEntry → const String
- secretsEntry → const String
- stateEntry → const String
- timestampsEntry → const String
- typeEntry → const String
- urlEntry → const String