Fire-and-forget sound effects (clicks, dings) that mix with the user's music instead of pausing it. USound.play("assets/sounds/tap.mp3")
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
Static Methods
-
dispose(
) → Future< void> -
play(
Object input, {double volume = 1, bool interrupt = false}) → Future< void> -
Plays an effect;
interruptstops the previous one on that player.USound.play("assets/sounds/success.mp3", volume: 0.6) -
preload(
List< Object> sources) → Future<void> -
Warms up assets so the first play has no delay.
USound.preload(["assets/sounds/tap.mp3"]) -
resolve(
Object input) → UMediaSource - Turns a URL/path/asset string into a cached source.
-
stopAll(
) → Future< void> - Stops every effect.