NowPlayingTrack class
A container for metadata around a single track state
Artist, album, track, duration, genre, source, progress
Constructors
-
NowPlayingTrack({String id,
String title, String album, String artist, Duration duration: Duration.zero, NowPlayingState state: NowPlayingState.stopped, String source, Duration position, DateTime createdAt} ) -
NowPlayingTrack.fromJson(Map<
String, dynamic> json) -
Creates a track from json [...]
factory
Properties
- album → String
-
final
- artist → String
-
final
- duration → Duration
-
final
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- hasIcon → bool
-
read-only
- hasImage → bool
-
read-only
-
icon
→ ImageProvider<
Object> -
An image representing the app playing the track
read-only
- id → String
-
final
-
image
↔ ImageProvider<
Object> -
The image for the track, probably album art [...]
read / write
- isPaused → bool
-
read-only
- isPlaying → bool
-
read-only
- isResolvingImage → bool
-
true if the image is being resolved, else false
read-only
- isStopped → bool
-
read-only
- needsResolving → bool
-
true of the image is empty and a resolution hasn't been attempted, else false
read-only
- progress → Duration
-
How long the track been has been playing, as a
Duration
[...]read-only - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- source → String
-
final
- state → NowPlayingState
-
final
- title → String
-
final
Methods
-
copy(
) → NowPlayingTrack - Creates a copy of a track, largely so that the stream knows it's mutated
-
noSuchMethod(
Invocation invocation ) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
override
Operators
-
operator ==(
Object other ) → bool -
The equality operator. [...]
inherited
Static Properties
- notPlaying ↔ NowPlayingTrack
-
read / write