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.Examples
- Interaction Sounds
- Play the Click
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 byNeoInitializer.initialize() and typically shouldn’t be called manually.
Return Value
NeoSounds.press()
Plays the click once. It plays whether or notenableInteractionSounds is on.
Optional Parameters
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.
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
Two semitones up (about
1.12). NeoCheckbox and NeoToggleSwitch use it when they turn on.Two semitones down (about
0.89). NeoCheckbox and NeoToggleSwitch use it when they turn off.Four semitones up (about
1.26). A hold-to-confirm NeoButton reaches this pitch at the end of its hold.Best Practices
- Check
enableInteractionSoundsbefore you callpressfrom your own widget, so the app setting applies. - Build a custom control on
NeoInteractableto get the click without callingpressyourself.
Behavior
- If the click fails to load,
pressdoes nothing. The failure is logged withNeoLogger.

