flutter_sound
9.30.0, released 12 months ago by tau.canardoux.xyz
Play and record audio on Flutter across mobile, web and desktop.
What it does
Provides APIs to playback audio from assets, files, URLs, buffers or Dart streams. Also records audio to files, buffers or Dart streams with various codecs.
AI-written summary of version 9.30.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need both playback and recording in the same app
- You want to process live audio data via Dart streams
- Cross‑platform support (iOS, Android, Web, desktop) is required
Skip it when
- You only need simple playback without recording
- You prefer a smaller, lightweight plugin
- You need a fully GPL‑compatible license
Strengths
- Full‑stack audio: play + record
- Stream‑based APIs for live processing
- Supports many codecs and platforms
Weaknesses
- Large plugin with native code, can be heavyweight
- Some platform bugs (e.g., iOS buffer underflow, Android recorder regressions)
- MPL‑2.0 license has a weak copyleft clause that may affect modifications
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 7
Add platform‑specific permissions (e.g., RECORD_AUDIO, WRITE_EXTERNAL_STORAGE on Android; microphone usage description on iOS). No build_runner needed.
import 'package:flutter_sound/flutter_sound.dart';
final player = FlutterSoundPlayer();
await player.openAudioSession();
await player.startPlayer(fromURI: 'https://example.com/audio.mp3');
// ... later
await player.stopPlayer();
await player.closeAudioSession();Alternatives
Packages that do the same job and could replace flutter_sound.
- audioplayers
Lightweight playback‑only solution
87Compare - record
Simple recording‑only plugin
94Compare
Works with
Packages commonly used together with flutter_sound: ones it builds on, ones built on it, and its own family.
- webflutter_sound depends on itLightweight bindings for browser APIs via JS interop
- path_providerflutter_sound depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- synchronizedflutter_sound depends on itLock mechanism to prevent concurrent access to asynchronous code.
- loggerflutter_sound depends on itAn extensible logger for printing formatted logs with levels, custom filters, and printers.