MethodChannelMediaManager class

Default MediaManagerPlatform implementation via MethodChannel.

Inheritance

Constructors

MethodChannelMediaManager()

Properties

hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearThumbnailCache() Future<void>
Clears the on-disk thumbnail cache.
override
getDirectories() Future<List<Map<String, String>>>
Returns the list of well-known public directories (DCIM, Pictures, Movies, Music, Downloads, Documents, …).
override
getDirectoryContents({required String path, int page = 0, int pageSize = 200}) Future<List<Map<String, dynamic>>>
Returns a single page of directory entries under path.
override
getMediaCount({MediaType type = MediaType.any, List<String> extensions = const []}) Future<int>
Returns the total count of media items matching the given filter.
override
getMediaPage({MediaType type = MediaType.any, List<String> extensions = const [], int page = 0, int pageSize = 100}) Future<List<MediaItem>>
Returns a single page of MediaItems sorted by date-modified descending.
override
getPlatformVersion() Future<String?>
Returns a human-readable platform version string, e.g. "Android 14".
override
getThumbnail({required String uriOrPath, int width = 256, int? height, int dateModified = 0, String kind = 'image'}) Future<String?>
Generates (or returns a cached) thumbnail for any media file.
override
hasStoragePermission() Future<bool>
Returns true if the app already has storage / media-read permission.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openAllFilesAccessSettings() Future<void>
Opens the system "All Files Access" settings page (Android 11+). No-op on iOS / macOS.
override
requestStoragePermission() Future<bool>
Asks the user for storage / media-read permission. Returns true when at least one permission was granted.
override
toString() String
A string representation of this object.
inherited

Operators

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