Helpers for the 10 audio clips shipped with this package.
All clips are 100 % original WAV files synthesized in Python, MIT-licensed, zero external dependencies:
| Clip | Duration | Character |
|---|---|---|
| BuiltinSound.pop | ~0.4 s | Punchy confetti snap |
| BuiltinSound.chime | ~2.2 s | C-major bell chord |
| BuiltinSound.fanfare | ~1.6 s | Triumphant brass fanfare |
| BuiltinSound.applause | ~2.0 s | Crowd clapping |
| BuiltinSound.whoosh | ~0.55 s | Fast frequency sweep |
| BuiltinSound.drumroll | ~1.6 s | Snare roll + cymbal crash |
| BuiltinSound.levelUp | ~1.0 s | 8-bit arpeggio jingle |
| BuiltinSound.bell | ~2.2 s | Clear resonant bell |
| BuiltinSound.sparkle | ~1.4 s | Magical high-freq twinkling |
| BuiltinSound.airhorn | ~0.85 s | Bold air-horn blast |
Auto-pick by preset
ConfettiEngine.celebrate(
context,
preset: Preset.nova,
feedback: CelebrationFeedback.bundledForPreset(Preset.nova),
);
Pick any clip directly
ConfettiEngine.celebrate(
context,
feedback: CelebrationFeedback(
enableSound: true,
builtinSound: BuiltinSound.fanfare,
),
);
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
- airhorn → String
-
Asset path for BuiltinSound.airhorn.
no setter
- applause → String
-
Asset path for BuiltinSound.applause.
no setter
- bell → String
-
Asset path for BuiltinSound.bell.
no setter
- chime → String
-
Asset path for BuiltinSound.chime.
no setter
- drumroll → String
-
Asset path for BuiltinSound.drumroll.
no setter
- fanfare → String
-
Asset path for BuiltinSound.fanfare.
no setter
- levelUp → String
-
Asset path for BuiltinSound.levelUp.
no setter
- pop → String
-
Asset path for BuiltinSound.pop.
no setter
- sparkle → String
-
Asset path for BuiltinSound.sparkle.
no setter
- whoosh → String
-
Asset path for BuiltinSound.whoosh.
no setter
Static Methods
-
builtinForPreset(
Preset preset) → BuiltinSound -
Returns the BuiltinSound best matched to
preset. -
pathForPreset(
Preset preset) → String -
Asset path of the clip best matched to
preset.