ImageMemoryMedia class

Represents image data stored in memory.

Can be saved to a file or transmitted without file system operations.

Inheritance

Constructors

ImageMemoryMedia(Uint8List bytes, {required String? name, String? mimeType})
Creates an ImageMemoryMedia with image content.

Properties

bytes → Uint8List
The raw byte data of the media.
finalinherited
extension → String
Extracts the file extension from the name.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
metadata → ImageType
Metadata about the media type (e.g., VideoType, AudioType).
finalinherited
mimeType → String?
The MIME type of the media, if available.
finalinherited
name → String
The name or identifier of the media.
finalinherited
props → List<Object?>
Includes the byte array in equality comparisons.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → FileSize?
The size of the media, if known.
finalinherited
stringify → bool?
Disables automatic string representation of byte arrays.
no setterinherited

Methods

fold<T>({T file(FileMediaSource<ImageType> fileMedia)?, T memory(MemoryMediaSource<ImageType> memoryMedia)?, T network(NetworkMediaSource<ImageType> networkMedia)?, T asset(AssetMediaSource<ImageType> assetMedia)?, T thumbnail(ThumbnailMediaSource<ImageType, dynamic> thumbnailMedia)?, required T orElse()}) → T
Performs pattern matching on media sources using a fold-like pattern.
inherited
isAnyType(List<Type> list) → bool
Checks if this media source's runtime type is in the given list.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saveTo(String path) → Future<ImageFileMedia>
Saves this image to a file at the specified path.
override
saveToFolder(String folderPath) → Future<FileMediaSource<ImageType>>
Saves this media to a file in the specified folder.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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