CelebrationFeedback.bundledForPreset constructor

CelebrationFeedback.bundledForPreset(
  1. Preset preset, {
  2. bool enableHaptics = true,
  3. bool enableSound = true,
})

Plays the BuiltinSound best matched to preset.

No asset registration needed — clips are bundled with the package.

Implementation

factory CelebrationFeedback.bundledForPreset(
  Preset preset, {
  bool enableHaptics = true,
  bool enableSound = true,
}) {
  return CelebrationFeedback(
    enableHaptics: enableHaptics,
    enableSound: enableSound,
    builtinSound: ConfettiBundledSounds.builtinForPreset(preset),
  );
}