MediaItem class Null safety

Metadata of an audio item that can be played, or a folder containing audio items.

Constructors

MediaItem({required String id, required String title, String? album, String? artist, String? genre, Duration? duration, Uri? artUri, bool? playable = true, String? displayTitle, String? displaySubtitle, String? displayDescription, Rating? rating, Map<String, dynamic>? extras})
Creates a MediaItem. [...]
const

Properties

album String?
The album this media item belongs to.
final
artist String?
The artist of this media item.
final
artUri Uri?
The artwork for this media item as a uri.
final
copyWith MediaItemCopyWith
Creates a copy of this MediaItem with with the given fields replaced by new values.
read-only
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. [...]
read-only, override
id String
A unique id.
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.
read-only, inherited
title String
The title of this media item.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override

Operators

operator ==(Object other) bool
The equality operator. [...]
override