Track class

This object represents a track.

Available extensions
Annotations
  • @JsonSerializable.new(includeIfNull: false)

Constructors

Track({required String name, Album? album, Artist? artist, String? url, Duration? duration, List<Image>? images, List<Tag>? topTags, Date? date, Streamable? streamable, int? listeners, int? playCount, Wiki? wiki, String? mbid, bool? loved})
Track.fromJson(Map<String, dynamic> json)
factory

Properties

album ↔ Album?
The album that contains the track.
getter/setter pair
artist ↔ Artist?
The artist that has created the track.
getter/setter pair
date ↔ Date?
The date of publishing of the track.
getter/setter pair
duration ↔ Duration?
The duration of the track.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
images ↔ List<Image>?
A list of different size of the track cover.
getter/setter pair
listeners ↔ int?
The number of listeners of the track.
getter/setter pair
loved ↔ bool?
If called from a User data, True if the user loved the track.
getter/setter pair
mbid ↔ String?
MusicBrainz ID.
getter/setter pair
name ↔ String
Name of the track.
getter/setter pair
playCount ↔ int?
The number of plays of the track.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
streamable ↔ Streamable?
Streamable object of the track.
getter/setter pair
topTags ↔ List<Tag>?
A list of Top Tags of the track.
getter/setter pair
url ↔ String?
getter/setter pair
wiki ↔ Wiki?
The wiki of the track.
getter/setter pair

Methods

addTags({required List<String> tags}) → Future<bool>

Available on Track, provided by the TrackExtension extension

TrackMethods.addTags
getCorrection() → Future<List<Track>>

Available on Track, provided by the TrackExtension extension

TrackMethods.getCorrection
getInfo({String? username, bool autoCorrect = false}) → Future<Track>

Available on Track, provided by the TrackExtension extension

TrackMethods.getInfo
getSimilar({int? limit, bool autoCorrect = false}) → Future<List<Track>?>

Available on Track, provided by the TrackExtension extension

TrackMethods.getSimilar
getTags({String? user, bool autoCorrect = false}) → Future<List<Tag>?>

Available on Track, provided by the TrackExtension extension

TrackMethods.getTags
getTopTags({bool autoCorrect = false}) → Future<List<Tag>?>

Available on Track, provided by the TrackExtension extension

TrackMethods.getTopTags
love() → Future<bool>

Available on Track, provided by the TrackExtension extension

TrackMethods.love
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeTag({required String tag}) → Future<bool>

Available on Track, provided by the TrackExtension extension

TrackMethods.removeTag
scrobble({String? album, int? trackNumber, Duration? duration, DateTime? timestamp, String? context, String? streamId, bool chosenByUser = false, String? mbid}) → Future<ScrobbleResponse>

Available on Track, provided by the TrackExtension extension

TrackMethods.scrobble

Available on Track, provided by the TrackExtension extension

TrackMethods.search
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited
unLove() → Future<bool>

Available on Track, provided by the TrackExtension extension

TrackMethods.unLove
updateNowPlaying({String? album, int? trackNumber, Duration? duration, DateTime? timestamp, String? context, String? streamId, bool chosenByUser = false, String? mbid}) → Future<NowPlayedTrack>

Available on Track, provided by the TrackExtension extension

TrackMethods.updateNowPlaying

Operators

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