PlaybackState class

Represents the current state of audio playback

Constructors

PlaybackState({required ProcessingState processingState, required bool playing, required String title, required int position, required int duration, required int timestamp, double speed = 1.0, double volume = 1.0, String? artist, String? album, String? url, String? artUri, String? genre, int? trackNumber, int? trackCount, int? year})
Creates a new PlaybackState
PlaybackState.fromMap(Map map)
Creates a PlaybackState from a map
factory

Properties

album → String?
The album of the current audio
final
artist → String?
The artist of the current audio
final
artUri → String?
The URI of the album art
final
duration → int
The duration in milliseconds
final
genre → String?
The genre of the current audio
final
hashCode → int
The hash code for this object.
no setterinherited
playing → bool
Whether the player is playing
final
position → int
The current position in milliseconds
final
processingState → ProcessingState
The current processing state
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
speed → double
The current playback speed
final
state → String
Converts the processing state to a string state for backward compatibility
no setter
timestamp → int
The timestamp when this state was created
final
title → String
The title of the current audio
final
trackCount → int?
The total number of tracks in the album
final
trackNumber → int?
The track number of the current audio
final
url → String?
The URL of the current audio
final
volume → double
The current volume
final
year → int?
The year of the current audio
final

Methods

copyWith({ProcessingState? processingState, bool? playing, String? title, int? position, int? duration, int? timestamp, double? speed, double? volume, String? artist, String? album, String? url, String? artUri, String? genre, int? trackNumber, int? trackCount, int? year}) → PlaybackState
Creates a copy of this PlaybackState with the given fields replaced
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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