OnAudioQuery class
Main method to use the on_audio_query plugin.
Example:
Init the plugin using:
final OnAudioQuery _audioQuery = OnAudioQuery();
Helpful Links:
Any problem? Issues
Any suggestion? Pull request
Copyright: © 2021, Lucas Josino. All rights reserved.
Constructors
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
-
addToPlaylist(
int playlistId, int audioId) → Future< bool> - Used to add a specific song/audio to a specific Playlist
-
createPlaylist(
String name, {String? author, String? desc}) → Future< int?> - Used to create a Playlist
-
moveItemTo(
int playlistId, int from, int to) → Future< bool> - Used to change song/audio position from a specific Playlist
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
observeAlbums(
{MediaFilter? filter}) → Stream< List< AlbumModel> > - Used to observe(listen) the albums changes.
-
observeArtists(
{MediaFilter? filter}) → Stream< List< ArtistModel> > - Used to observe(listen) the artists changes.
-
observeAudios(
{MediaFilter? filter}) → Stream< List< AudioModel> > - Used to observe(listen) the audios changes.
-
observeGenres(
{MediaFilter? filter}) → Stream< List< GenreModel> > - Used to observe(listen) the genres changes.
-
observePlaylists(
{MediaFilter? filter}) → Stream< List< PlaylistModel> > - Used to observe(listen) the playlists changes.
-
observersStatus(
) → Future< ObserversModel> - Used to check the observers(listeners) status of:
-
permissionsRequest(
) → Future< bool> - Used to request Android permissions.
-
permissionsStatus(
) → Future< bool> - Used to check Android permissions status
-
queryAlbums(
{MediaFilter? filter, bool fromAsset = false, bool fromAppDir = false, AlbumSortType? sortType, OrderType? orderType, UriType? uriType, bool? ignoreCase}) → Future< List< AlbumModel> > - Used to return albums info.
-
queryAllPath(
) → Future< List< String> > -
Deprecated after
3.0.0
-
queryArtists(
{MediaFilter? filter, bool fromAsset = false, bool fromAppDir = false, ArtistSortType? sortType, OrderType? orderType, UriType? uriType, bool? ignoreCase}) → Future< List< ArtistModel> > - Used to return artists info.
-
queryArtwork(
int id, ArtworkType type, {MediaFilter? filter, ArtworkFormat? format, int? size, int? quality}) → Future< ArtworkModel?> - Used to return Songs Artwork.
-
queryAudios(
{MediaFilter? filter, bool fromAsset = false, bool fromAppDir = false}) → Future< List< AudioModel> > - Used to return audios info based in AudioModel.
-
queryAudiosFrom(
AudiosFromType type, Object where, {SongSortType? sortType, OrderType? orderType, bool? ignoreCase}) → Future< List< SongModel> > -
Deprecated after
3.0.0
. Use one of thequery
methods instead -
queryDeviceInfo(
) → Future< DeviceModel> - Used to return Device Info
-
queryFromFolder(
String path, {SongSortType? sortType, OrderType? orderType, UriType? uriType}) → Future< List< SongModel> > -
Deprecated after
3.0.0
. Use one of thequery
methods instead -
queryGenres(
{MediaFilter? filter, bool fromAsset = false, bool fromAppDir = false, GenreSortType? sortType, OrderType? orderType, UriType? uriType, bool? ignoreCase}) → Future< List< GenreModel> > - Used to return genres info.
-
queryPlaylists(
{MediaFilter? filter, PlaylistSortType? sortType, OrderType? orderType, UriType? uriType, bool? ignoreCase}) → Future< List< PlaylistModel> > - Used to return playlists info.
-
querySongs(
{MediaFilter? filter, bool fromAsset = false, bool fromAppDir = false, SongSortType? sortType, OrderType? orderType, UriType? uriType, bool? ignoreCase, String? path}) → Future< List< AudioModel> > - Used to return songs info.
-
queryWithFilters(
String argsVal, WithFiltersType withType, {dynamic args}) → Future< List> -
Deprecated after
3.0.0
. Use one of thequery
methods instead -
removeFromPlaylist(
int playlistId, int audioId) → Future< bool> - Used to remove a specific song/audio from a specific Playlist
-
removePlaylist(
int playlistId) → Future< bool> - Used to remove/delete a Playlist
-
renamePlaylist(
int playlistId, String newName) → Future< bool> - Used to rename a specific Playlist
-
scanMedia(
String path) → Future< bool> -
Used to scan the given
path
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- platform → OnAudioQueryPlatform
-
The platform interface that drives this plugin
no setter
Static Methods
-
clearCachedArtworks(
) → Future< bool> - Used to delete all artworks cached after using queryArtwork.
Constants
- artworksPath → const String
- The default path used to store or cache the 'queried' images/artworks.