Skip to content
pubscout

just_audio_platform_interface

4.6.0, released a year ago by ryanheise.com

A platform interface for the just_audio plugin, defining the contract for platform-specific implementations.

WASM-readyQuiet but busy
$ flutter pub add just_audio_platform_interface
Source repository

What it does

Provides a common API that all just_audio platform implementations must follow, ensuring consistency across Android, iOS, web, and desktop. It exposes methods for audio playback control, configuration, and event streams.

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

Use it when

  • You need to create a custom platform implementation for just_audio.
  • You want to ensure your plugin stays compatible with future just_audio releases.

Skip it when

  • You only need to use just_audio itself without custom platform code.

Strengths

  • Guarantees interface compatibility across platforms.
  • Simplifies plugin development by centralizing API definitions.
  • Supports future feature extensions via interface updates.

Weaknesses

  • Only an interface; no functionality on its own.
  • Requires a separate implementation to be useful.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Add dependency to pubspec and implement JustAudioPlatform subclass.

```dart
import 'package:just_audio_platform_interface/just_audio_platform_interface.dart';

class MyPlatformJustAudio extends JustAudioPlatform {
  @override
  Future<void> initialize() async {
    // platform-specific init
  }
}

void register() {
  JustAudioPlatform.instance = MyPlatformJustAudio();
}
```

Alternatives

Packages that do the same job and could replace just_audio_platform_interface.

Works with

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