AudioMemoryMedia class

Represents audio data stored in memory.

Stores audio metadata including optional duration information. Can be saved to a file or transmitted without file system operations.

Inheritance

Constructors

AudioMemoryMedia(Uint8List bytes, {required String? name, Duration? duration, String? mimeType})
Creates an AudioMemoryMedia with audio content and optional duration.

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 AudioType
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<AudioType> fileMedia)?, T memory(MemoryMediaSource<AudioType> memoryMedia)?, T network(NetworkMediaSource<AudioType> networkMedia)?, T asset(AssetMediaSource<AudioType> assetMedia)?, T thumbnail(ThumbnailMediaSource<AudioType, 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<AudioFileMedia>
Saves this audio to a file at the specified path.
override
saveToFolder(String folderPath) Future<FileMediaSource<AudioType>>
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