SoLoudService class

Singleton service wrapping flutter_soloud for cross-platform audio processing.

Provides centralized access to the SoLoud engine for:

  • Loading and playing audio sources
  • Applying audio filters (EQ, reverb, echo, etc.)
  • Waveform generation
  • FFT/waveform visualization data

Constructors

SoLoudService()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isInitialized bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

activateGlobalFilter(FilterType filterType) → void
Activate a global filter by its FilterType.
deactivateGlobalFilter(FilterType filterType) → void
Deactivate a global filter by its FilterType.
dispose() → void
Dispose the SoLoud engine. Should be called on app shutdown.
disposeSource(AudioSource source) Future<void>
Dispose a loaded audio source.
initialize() Future<bool>
Initialize the SoLoud engine. Safe to call multiple times.
loadAsset(String assetPath) Future<AudioSource?>
Load an audio source from a Flutter asset path.
loadMem(String filename, Uint8List bytes) Future<AudioSource?>
Load an audio source from memory (raw bytes).
loadUrl(String url) Future<AudioSource?>
Load an audio source from a URL.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
play(AudioSource source, {double volume = 1.0, double pan = 0.0, bool paused = false, bool looping = false}) Future<SoundHandle?>
Play a loaded audio source.
seek(SoundHandle handle, Duration position) → void
Seek to a position in seconds.
setPan(SoundHandle handle, double pan) → void
Set pan for a playing sound (-1.0 left to 1.0 right).
setPause(SoundHandle handle, bool paused) → void
Pause/unpause a sound handle.
setVolume(SoundHandle handle, double volume) → void
Set volume for a playing sound (0.0 to 1.0).
stop(SoundHandle handle) → void
Stop a specific sound handle.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited