Skip to content
pubscout

audioplayers_platform_interface

7.2.0, released 5 months ago by blue-fire.xyz

Platform interface for the audioplayers Flutter plugin.

WASM-ready
$ flutter pub add audioplayers_platform_interface
Source repository

What it does

Provides the abstract API that platform-specific implementations of the audioplayers plugin must implement. It defines the contract for playing, pausing, seeking, and managing multiple audio players across Android, iOS, web, Windows, macOS, and Linux.

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

Use it when

  • You need to create a custom platform implementation for audioplayers.
  • You want to extend or replace the default audioplayers behavior on a specific platform.

Skip it when

  • You only need ready‑to‑use audio playback without writing platform code.

Strengths

  • Enables custom platform implementations.
  • Keeps the core audioplayers plugin platform‑agnostic.
  • Supports all major Flutter platforms out of the box.

Weaknesses

  • Contains no actual playback functionality itself.
  • Requires a separate concrete implementation to be useful.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3
import 'package:audioplayers_platform_interface/audioplayers_platform_interface.dart';

class MyAudioplayersPlatform extends AudioplayersPlatformInterface {
  // implement required methods here
}

void main() {
  AudioplayersPlatformInterface.instance = MyAudioplayersPlatform();
  // now use the audioplayers package as usual
}

Alternatives

Packages that do the same job and could replace audioplayers_platform_interface.

Works with

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