Skip to main content
BETA NeoSounds and interaction sounds are in beta. They may change before the stable release.
NeoSounds is initialized by NeoInitializer.initialize() in main.dart. Neo controls play the click only when NeoConfig.enableInteractionSounds is true. It is false by default.
On web, add the flutter_soloud loader script to web/index.html. Without it, NeoInitializer.initialize() waits about 5 seconds and the sounds do not load. See Install Neo.

Examples

Platform Support

iOS: Neo sets the shared audio session to ambient when it initializes. The click mixes with other audio, and the Ring/Silent switch mutes it. The session is shared by the whole app, so an app that plays media sets its own category after NeoInitializer.initialize().Web: Needs the flutter_soloud loader script in web/index.html. See Install Neo.

Methods

NeoSounds.initialize()

Loads the click and starts the audio engine. This method is called by NeoInitializer.initialize() and typically shouldn’t be called manually.

Return Value

Future<void>
A Future that completes when the click is loaded, or when loading failed.

NeoSounds.press()

Plays the click once. It plays whether or not enableInteractionSounds is on.

Optional Parameters

double
default:"1"
Playback speed. Above 1 plays the click higher and shorter. Below 1 plays it lower and longer. Use the scale constants to match Neo’s controls.
double
default:"1"
Volume of the click. 1 is full volume.
bool
default:"false"
When true, schedules the click on the audio clock, so clicks less than 400 ms apart keep the spacing between your calls. Use it for a run of clicks, like ticks.

Constants

double
Two semitones up (about 1.12). NeoCheckbox and NeoToggleSwitch use it when they turn on.
double
Two semitones down (about 0.89). NeoCheckbox and NeoToggleSwitch use it when they turn off.
double
Four semitones up (about 1.26). A hold-to-confirm NeoButton reaches this pitch at the end of its hold.

Best Practices

  • Check enableInteractionSounds before you call press from your own widget, so the app setting applies.
  • Build a custom control on NeoInteractable to get the click without calling press yourself.

Behavior

  • If the click fails to load, press does nothing. The failure is logged with NeoLogger.
Last modified on November 18, 2026