flutter_audio_output
1.0.7, released 6 months ago by an unverified publisher
Flutter plugin to query and switch audio output devices
What it does
Provides APIs to get the current audio output, list available devices, and switch between speaker, receiver, headphones, and Bluetooth. It also allows listening for device changes and handles errors gracefully.
AI-written summary of version 1.0.7, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to control audio routing in a media app
- You want to react to changes in connected audio devices
- You need a null‑safe, type‑safe API for audio output management
Skip it when
- You only need to play audio without routing control
- You are building a simple audio player that uses just_audio or audioplayers
Strengths
- Supports Android API 21+ and iOS 13+
- Fully null‑safe and type‑safe
- Provides listener callbacks for device changes
- Cross‑platform Flutter 3+ support
Weaknesses
- Only handles output routing, not recording
- No built‑in playback functionality
- Limited to four device types
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:flutter_audio_output/flutter_audio_output.dart';
final current = await FlutterAudioOutput.getCurrentOutput();
print('Current output: ${current.name} (${current.port})');
await FlutterAudioOutput.changeToSpeaker();Alternatives
Packages that do the same job and could replace flutter_audio_output.
- spotify_sdk
Flutter plugin for Spotify App Remote SDK and Web Playback SDK integration.
86Compare - mpv_audio_kit
Cross-platform audio player built on libmpv and FFmpeg.
84Compare - audio_metadata_reader
Pure Dart metadata reader and writer for MP3, MP4, FLAC, OGG, Opus, WAV, AIFF, and APE files.
78Compare - ffmpeg_kit_flutter_new_audio
Run FFmpeg and FFprobe commands from Dart with prebuilt audio codecs for multiple platforms.
79Compare
Works with
Packages commonly used together with flutter_audio_output: ones it builds on, ones built on it, and its own family.