Skip to content
pubscout

flame_audio

2.12.2, released 4 months ago by flame-engine.org

Audio support wrapper for the Flame game engine

$ flutter pub add flame_audio
Source repository

What it does

Provides audio capabilities for Flame games using audioplayers underneath. Allows playing general sound effects, looping background music, caching tracks, and managing audio pools.

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

Use it when

  • You are building a game with the Flame engine and need sound effects or background music
  • You want a thin audio wrapper optimized for Flame game integration

Skip it when

  • You are not using the Flame game engine
  • You need a complex standalone music player UI outside of a game context

Strengths

  • Seamless integration with Flame game code
  • Supports caching tracks and high-frequency audio pools for rapid sound effects
  • Built-in background music (bgm) management

Weaknesses

  • Thin wrapper; advanced audio manipulation depends entirely on audioplayers
  • Requires specific asset directory configuration in pubspec.yaml

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3

Add audio files to assets/audio and configure assets in pubspec.yaml.

import 'package:flame_audio/flame_audio.dart';

FlameAudio.play('explosion.mp3');
FlameAudio.loop('music.mp3');

Alternatives

Packages that do the same job and could replace flame_audio.

Works with

Packages commonly used together with flame_audio: ones it builds on, ones built on it, and its own family.