CoverArt class

Cover-art payload extracted from the currently loaded file.

bytes holds the original codec data (PNG / JPEG / WEBP / BMP / GIF) exactly as it was embedded in the audio file's attached picture stream — no re-encoding, no thumbnail generation.

Drop directly into a Flutter Image widget via image:

Image(image: art.image, fit: BoxFit.cover)

Equality follows reference identity: two CoverArt instances with the same byte content compare unequal because Uint8List itself does not implement value equality. Use the bytes directly for image cache keys.

Constructors

CoverArt({required Uint8List bytes, required String mimeType})
Creates a cover-art payload from raw image bytes and their mimeType.
const

Properties

bytes Uint8List
The raw file content (e.g. PNG bytes starting with \x89PNG).
final
extension String
File extension matching mimeTypepng, jpg, webp, bmp, gif, or empty if the MIME type is unknown.
no setter
hashCode int
The hash code for this object.
no setterinherited
image ImageProvider<Object>
A Flutter ImageProvider backed by bytes. Pass straight to Image(image: …).
no setter
isBmp bool
Whether mimeType is image/bmp.
no setter
isGif bool
Whether mimeType is image/gif.
no setter
isJpeg bool
Whether mimeType is image/jpeg.
no setter
isPng bool
Whether mimeType is image/png.
no setter
isWebp bool
Whether mimeType is image/webp.
no setter
mimeType String
MIME type — image/png, image/jpeg, image/webp, image/bmp, or image/gif.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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