MethodChannelMediaManager class

The platform-specific implementation of MediaManager using method channels. This class handles all communication between Dart and native platforms (Android/iOS).

Inheritance

Properties

hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
The method channel used to interact with the native platform. Marked as @visibleForTesting to allow test code to mock the channel.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearImageCache() Future<bool>
Clears cached image thumbnails. Returns true if the operation succeeded. Example:
override
getAllAudio() Future<List<String>>
Retrieves paths of all audio files on device. Returns List< String> of absolute file paths. Example:
override
getAllDocuments() Future<List<String>>
Retrieves paths of all document files on device. Returns List< String> of absolute file paths. Example:
override
getAllImages() Future<List<String>>
Retrieves paths of all image files on device. Returns List< String> of absolute file paths. Example:
override
getAllVideos() Future<List<String>>
Retrieves paths of all video files on device. Returns List< String> of absolute file paths. Example:
override
getAllZipFiles() Future<List<String>>
Retrieves paths of all zip files on device. Returns List< String> of absolute file paths. Example:
override
getDirectories() Future<List<Map<String, dynamic>>>
Retrieves device directories through the platform channel. Returns a List of Maps with directory information (name, path, etc.). Example:
override
getDirectoryContents(String path) Future<List<Map<String, dynamic>>>
Gets contents of a specific directory by its path. path - The absolute path of the directory to scan. Returns a List of Maps with file/folder details. Example:
override
getImagePreview(String path) Future<Uint8List?>
Retrieves an image thumbnail/preview as a byte array. path - The path of the image file. Returns Uint8List containing image data or null if unavailable. Example:
override
getPlatformVersion() Future<String?>
Gets the platform version using the method channel. Returns a String containing the platform version information. Example:
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestMacStoragePermission() Future<bool>
Requests Mac storage permission from the user. Returns true if permission was granted. Example:
override
requestStoragePermission() Future<bool>
Requests storage permission from the user. Returns true if permission was granted. Example:
override
toString() String
A string representation of this object.
inherited

Operators

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