SimpleMediaQuery class
The main class for querying media files from device storage Uses clean architecture with proper error handling and permission management
Constructors
- SimpleMediaQuery()
- Initialize the plugin with clean architecture
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
-
checkPermissions(
MediaType mediaType) → Future< PermissionResult> - Check if required permissions are granted for specific media type
-
clearCachedArtworks(
) → Future< void> - Clear cached artworks
-
getDeviceInfo(
) → Future< Map< String, dynamic> > - Get device information
-
getMissingRequiredPermissions(
MediaType mediaType) → Future< List< MediaPermission> > - Get missing required permissions for specific media type
-
getPlatformVersion(
) → Future< String> - Get the platform version
-
hasPermission(
[MediaType mediaType = MediaType.all]) → Future< bool> - Check if all required permissions are granted (legacy method)
-
isPermissionGranted(
MediaPermission permission) → Future< bool> - Check if specific permission is granted
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queryAlbums(
{QueryOptions? options}) → Future< List< Map< >String, dynamic> > - Query album information
-
queryArtists(
{QueryOptions? options}) → Future< List< Map< >String, dynamic> > - Query artist information
-
queryArtwork(
int id, ArtworkType type, {ArtworkSize size = ArtworkSize.medium}) → Future< ArtworkModel> - Query artwork/thumbnail for media
-
queryAudios(
{AudioQueryOptions? options}) → Future< List< AudioModel> > - Query audio files with permission checking and error handling
-
queryAudiosFromAlbum(
int albumId, {AudioQueryOptions? options}) → Future< List< AudioModel> > - Query audio files from a specific album
-
queryAudiosFromArtist(
int artistId, {AudioQueryOptions? options}) → Future< List< AudioModel> > - Query audio files from a specific artist
-
queryAudiosFromGenre(
int genreId, {AudioQueryOptions? options}) → Future< List< AudioModel> > - Query audio files from a specific genre
-
queryAudiosFromPath(
String path, {AudioQueryOptions? options}) → Future< List< AudioModel> > - Query audio files from a specific path
-
queryDocuments(
{QueryOptions? options}) → Future< List< DocumentModel> > - Query document files with permission checking and error handling
-
queryDocumentsFromPath(
String path, {QueryOptions? options}) → Future< List< DocumentModel> > - Query document files from a specific path
-
queryFolders(
{QueryOptions? options}) → Future< List< FolderModel> > - Query folder/directory information with permission checking and error handling
-
queryFoldersFromPath(
String path, {QueryOptions? options}) → Future< List> - Query folders from a specific path
-
queryGenres(
{QueryOptions? options}) → Future< List< Map< >String, dynamic> > - Query genre information
-
queryVideos(
{VideoQueryOptions? options}) → Future< List< VideoModel> > - Query video files with permission checking and error handling
-
queryVideosFromPath(
String path, {VideoQueryOptions? options}) → Future< List< VideoModel> > - Query video files from a specific path
-
requestPermission(
[MediaType mediaType = MediaType.all]) → Future< bool> - Request storage permission (legacy method)
-
requestPermissions(
MediaType mediaType) → Future< PermissionResult> - Request permissions for specific media type
-
scanMedia(
String path) → Future< void> - Scan media files in a specific path
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited