1. The HapticFeedback methods
HapticFeedback in package:flutter/services.dart triggers the platform's built-in haptic patterns. On iOS they map to the system impact and selection generators; on Android they use the view's haptic feedback constants, so the feel depends on the device's motor and the user's touch-feedback setting.
- selectionClick(): a very light tick for changing a selection, such as a picker, segmented control or toggle.
- lightImpact(): a light tap for ordinary button presses and small confirmations.
- mediumImpact(): something snapping into place, like a drag reaching a detent.
- heavyImpact(): rare, for significant moments. Overuse makes the app feel noisy.
- vibrate(): a plain vibration. Avoid it for UI taps; it is long and coarse.
3. System click sounds and Feedback.forTap
Material buttons, InkWell and ListTile already call Feedback.forTap when enableFeedback is true (the default). On Android that plays the system click sound, which respects the user's touch-sound setting. On iOS it does nothing, because iOS has no system tap sound for apps.
SystemSound.play(SystemSoundType.click) is the lower-level call behind it and has the same platform limits. If you need a tap sound on iOS, or a sound that means something specific (sent, saved, error), you have to play your own audio.
4. Synthesized sounds with Kipluo, plus your haptic
Kipluo widgets play short synthesized sounds (pops, ticks, chimes) through flutter_soloud on every platform, panned toward where the widget is on screen. They don't trigger haptics themselves, so add a HapticFeedback call in the widget's callback.
The free Favorite Toggle below plays its pop and sparkle on its own; the haptic is the one line you add. KipluoSound.play lets your own widgets use the same sounds, and KipluoSound.enabled is the global mute.
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:kipluo/kipluo.dart';
class LikeButton extends StatefulWidget {
const LikeButton({super.key});
@override
State<LikeButton> createState() => _LikeButtonState();
}
class _LikeButtonState extends State<LikeButton> {
bool _liked = false;
@override
Widget build(BuildContext context) {
return FavoriteToggle(
pressed: _liked,
label: 'Like',
onChanged: (v) {
HapticFeedback.lightImpact();
setState(() => _liked = v);
},
);
}
}
// Your own widget, same sound set:
Builder(
builder: (context) => TextButton(
onPressed: () {
HapticFeedback.selectionClick();
KipluoSound.play(KSound.pop, at: context); // panned to this button
send();
},
child: const Text('Send'),
),
);Accessibility checklist
Tick each one off as you check your build. Your ticks stay in this browser.
0 of 4 checked
Build it yourself or install it
Build it yourself when
Haptics only. HapticFeedback calls in your callbacks need no package.
Install Kipluo when
You want tap sounds on iOS and Android, matched to each widget's motion, with stereo placement and a global mute.