MediaItem class
Metadata of an audio item that can be played, or a folder containing audio items.
Constructors
-
MediaItem.new({required String id, required String title, String? album, String? artist, String? genre, Duration? duration, Uri? artUri, Map<
String, String> ? artHeaders, bool? playable = true, String? displayTitle, String? displaySubtitle, String? displayDescription, Rating? rating, bool? isLive, Map<String, dynamic> ? extras}) -
Creates a MediaItem.
const
Properties
- album → String?
-
The album this media item belongs to.
final
-
artHeaders
→ Map<
String, String> ? -
The HTTP headers to use when sending an HTTP request for artUri.
final
- artist → String?
-
The artist of this media item.
final
- artUri → Uri?
-
The artwork URI for this media item.
final
- copyWith → MediaItemCopyWith
-
Creates a copy of this MediaItem with with the given fields replaced by
new values.
no setter
- displayDescription → String?
-
Override the default description for display purposes.
final
- displaySubtitle → String?
-
Override the default subtitle for display purposes.
final
- displayTitle → String?
-
Override the default title for display purposes.
final
- duration → Duration?
-
The duration of this media item.
final
-
extras
→ Map<
String, dynamic> ? -
A map of additional metadata for the media item.
final
- genre → String?
-
The genre of this media item.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
A unique id.
final
- isLive → bool?
-
Whether this is a live stream.
final
- playable → bool?
-
Whether this is playable (i.e. not a folder).
final
- rating → Rating?
-
The rating of the media item.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String
-
The title of this media item.
final
Methods
-
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.
override