MediaManagerPlatform class abstract

Abstract base class for all platform implementations.

All method channels, mock implementations and future FFI implementations must extend this class.

Inheritance
  • Object
  • PlatformInterface
  • MediaManagerPlatform
Implementers

Constructors

MediaManagerPlatform()

Properties

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

Methods

clearThumbnailCache() Future<void>
Clears the on-disk thumbnail cache.
getDirectories() Future<List<Map<String, String>>>
Returns the list of well-known public directories (DCIM, Pictures, Movies, Music, Downloads, Documents, …).
getDirectoryContents({required String path, int page = 0, int pageSize = 200}) Future<List<Map<String, dynamic>>>
Returns a single page of directory entries under path.
getMediaCount({MediaType type = MediaType.any, List<String> extensions = const []}) Future<int>
Returns the total count of media items matching the given filter.
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.
getPlatformVersion() Future<String?>
Returns a human-readable platform version string, e.g. "Android 14".
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.
hasStoragePermission() Future<bool>
Returns true if the app already has storage / media-read permission.
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.
requestStoragePermission() Future<bool>
Asks the user for storage / media-read permission. Returns true when at least one permission was granted.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance MediaManagerPlatform
getter/setter pair