MediaMetadata class
Represents the metadata of the media being played.
This information is displayed in the system media controls.
Constructors
- MediaMetadata({String? title, String? artist, String? album, String? artworkUri, Duration? duration})
-
Creates a new MediaMetadata instance.
const
-
MediaMetadata.fromJson(Map<
String, dynamic> json) -
Creates a MediaMetadata instance from a JSON map.
factory
Properties
- album → String?
-
The album title of the media.
final
- artist → String?
-
The artist or creator of the media.
final
- artworkUri → String?
-
A URI pointing to the artwork/cover image of the media.
final
- duration → Duration?
-
The total duration of the media.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String?
-
The title of the media.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts the metadata to a JSON map for platform channel communication.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited