Track class

A track in the Spotify library.

Annotations
  • @JsonSerializable.new()

Constructors

Track(Album album, Artist artist, List<Artist> artists, int duration, ImageUri imageUri, String name, String uri, String? linkedFromUri, {required bool isEpisode, required bool isPodcast})
Constructor for Track.
Track.fromJson(Map<String, dynamic> json)
Converts a Map<String, dynamic> to a Track.
factory

Properties

album → Album
The album this track belongs to.
final
artist → Artist
The main artist of this track.
final
artists → List<Artist>
The list of artists of this track.
final
duration → int
The duration of the track in milliseconds.
final
hashCode → int
The hash code for this object.
no setterinherited
imageUri → ImageUri
The URI for the track image.
final
isEpisode → bool
Whether the track is an episode.
final
isPodcast → bool
Whether the track is a podcast.
final
linkedFromUri → String?
The URI of the track this one was linked from.
final
name → String
The name of the track.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
uri → String
The URI of the track.
final

Methods

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

Operators

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