audio_helper 0.1.1 copy "audio_helper: ^0.1.1" to clipboard
audio_helper: ^0.1.1 copied to clipboard

Help you easier to add sounds and background music to your games or apps.

Audio Helper #

Help you easier to add sounds and background music to your games or apps.

Usage #

Default path of the asset files:

flutter:
  assets:
    # Backgound music path 
    - assets/audio/music/name1.mp3
    - assets/audio/music/name2.mp3
    
    # Sound path
    - assets/audio/sound/sound.mp3
copied to clipboard

Initialize the plugin:

await AudioHelper.initial(
    backgroundMusicNames: ['name1.mp3','name2.mp3'],
);

copied to clipboard

Play & stop background music:

/// Play
AudioHelper.playMusic();

/// Stop
AudioHelper.stopMusic();
copied to clipboard

Play sound:

AudioHelper.playSound('sound.mp3');
copied to clipboard

Notice: I've only tested this plugin on my real project, so it doesn't have any examples or tests yet.

3
likes
160
points
56
downloads

Publisher

verified publisherlamnhan.dev

Weekly Downloads

2024.07.08 - 2025.01.20

Help you easier to add sounds and background music to your games or apps.

Repository (GitHub)

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter, just_audio

More

Packages that depend on audio_helper