sound_library 1.0.0

SDKflutter
Platformandroidioswindowslinuxmacosweb

Easy UI sounds to directly use in your app through mis develop sound library database

Sounds library package by MIS Develop

Features

Easy and free 🆓 UI sounds library 🎶 for your general purposes 🎧 🔊

Web deploy

Getting started

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  sound_library: ^1.0.0

Add this import line

import 'package:sound_library/sound_library.dart';  

Available sounds

Try out the sounds in the example project

Live example: Sounds Library

NameDescription
ClickGeneral button click
ActionGeneral action sound (Usually no user interaction)
OpenOpen drawer, open menu, open popup, etc.
DeletedDelete item, delete file, etc.
WelcomeWelcome sound
SuccessIndicates success or completed action
DragDrag and drop sound
IntroIntro sound
Add to cartAdd to cart sound
Close (Wood hit)High pitched sound of two wood blocks
Order CompleteOrder completed sound
Cashing machineCashing machine sound

Usage

Play a sound with a volume level and position on the track
  SoundPlayer.play(Sounds.click, volume: 0.5, position: Duration(milliseconds: 500);
Play a sound from the Sounds library
  SoundPlayer.play(Sounds.click);
Play a sound from a URL path
  SoundPlayer.playFromUrl(path);
Play a sound from a file path
  SoundPlayer.playFromDeviceFilePath(file);
Play a sound from an asset path
  SoundPlayer.playFromAssetPath(asset);
Play a sound from bytes
  SoundPlayer.playFromBytes(bytes);
Check if audio is currently enabled
  bool enabled = SoundPlayer.isAudioEnabled;
Check if audio is enabled on the device storage

This will also load the state from the device storage onto the isAudioEnabled property

  bool enabled = await SoundPlayer.checkLocalStorageEnabled();
Enable/disable sounds

This will also save the state to the device storage

  SoundPlayer.setAudioEnabled(true/false);

Additional information

This package assumes corresponding permissions depending on platform. Also, take a look at the example project for more information.