Skip to content
pubscout

flutter_audio_output

1.0.7, released 6 months ago by an unverified publisher

Flutter plugin to query and switch audio output devices

WASM-ready
$ flutter pub add flutter_audio_output
Source repository

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.

Works with

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