PlayerState class

The state of the Spotify player.

Annotations
  • @JsonSerializable.new()

Constructors

PlayerState(Track? track, double playbackSpeed, int playbackPosition, PlayerOptions playbackOptions, PlayerRestrictions playbackRestrictions, {required bool isPaused})
Constructor for PlayerState.
PlayerState.fromJson(Map<String, dynamic> json)
Converts a Map<String, dynamic> to a PlayerState.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isPaused bool
Whether the player is paused.
final
playbackOptions PlayerOptions
The current playback options.
final
playbackPosition int
The current playback position in milliseconds.
final
playbackRestrictions PlayerRestrictions
The current playback restrictions.
final
playbackSpeed double
The current playback speed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
track Track?
The currently playing track.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts a PlayerState to a Map<String, dynamic>.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited