Skip to content
pubscout

on_audio_query

2.9.0, released 4 years ago by lucasjosino.com

Query audio and song metadata from device storage across Android, iOS, and Web.

WASM-readyRepository archivedQuiet but busy
$ flutter pub add on_audio_query
Source repository

What it does

Allows developers to query songs, albums, artists, playlists, and genres from the device's storage. It also supports fetching and displaying artwork using a built-in widget and managing playlists.

AI-written summary of version 2.9.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to build a custom music player that reads local audio files from the device.
  • You want to organize and query songs by artist, album, genre, or playlist.
  • You need to display artwork associated with local audio files.

Skip it when

  • You are streaming music exclusively from remote servers.
  • You only need general file picking rather than a specialized music library database.

Strengths

  • Comprehensive querying methods for songs, albums, artists, playlists, and genres.
  • Built-in QueryArtworkWidget for rendering album art easily.
  • Cross-platform support covering Android, iOS, and Web.

Weaknesses

  • Playlist manipulation and certain media scanning methods are limited or not supported on iOS and Web.
  • Requires explicit native permissions setup in AndroidManifest.xml and Info.plist.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
4

Requires adding storage/media permissions to AndroidManifest.xml and NSAppleMusicUsageDescription to Info.plist for iOS.

final OnAudioQuery _audioQuery = OnAudioQuery();

List<AudioModel> audios = await _audioQuery.queryAudios();

Alternatives

Packages that do the same job and could replace on_audio_query.