vibe_tap 0.0.4
vibe_tap: ^0.0.4 copied to clipboard
A Flutter widget that adds vibration (haptic feedback) and debounce protection to taps. Prevents multiple quick taps while providing smooth haptic interaction.
vibe_tap #
A lightweight Flutter plugin that provides customizable vibration (haptic) feedback for taps, gestures, and UI interactions.
Easily enhance your appโs user experience with subtle, consistent haptic feedback.
๐ Features #
- ๐น Trigger vibration on tap, press, or gesture
- ๐น Customize vibration intensity and duration
- ๐น Works across Android and iOS
- ๐น Simple and developer-friendly API
๐ง Getting Started #
Add this to your pubspec.yaml:
dependencies:
vibe_tap: ^0.0.2
Then import it:
import 'package:vibe_tap/vibe_tap.dart';
โก Usage Example #
import 'package:flutter/material.dart';
import 'package:vibe_tap/vibe_tap.dart';
class MyButton extends StatelessWidget {
const MyButton({super.key});
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () {
VibeTap.light(); // Trigger a light vibration
},
child: Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.circular(12),
),
child: const Text(
'Tap Me',
style: TextStyle(color: Colors.white),
),
),
);
}
}
๐๏ธ Available Vibration Types #
VibeTap.light();
VibeTap.medium();
VibeTap.heavy();
VibeTap.custom(duration: Duration(milliseconds: 300));
๐งพ License #
MIT License.
See the LICENSE file for details.
โค๏ธ Contributing #
Pull requests are welcome!
If you encounter any issues, please open an issue.