A customizable Flutter widget that adds shake animations with haptic and vibration feedback. Perfect for invalid forms, error indicators, or drawing attention to UI components.
✨ Features
Shake any widget on demand
Built-in presets: light, medium, heavy
Optional vibration (custom or haptic)
Fully customizable offset, pattern & intensities
Easy to trigger using a GlobalKey
📦 Installation
dependencies:awesome_shake_widget:^1.0.1
Run:
flutter pub get
🧪 Usage
1️⃣ Standard (Shake + Vibration)
By using the built-in presets — light, medium, heavy and custom — you can quickly apply different vibration intensities and patterns, perfectly paired with UI shake animations for a dynamic and responsive user experience.
If you only want the visual shake effect without vibration, you can set vibrationType to VibrationType.none using the ShakeConfig. To customize the intensity of the shake, adjust the offset value — higher values will produce a stronger visual effect.
3️⃣ Advanced Configuration: Full Control Over Visual and Vibration Effects
You can also create custom vibration patterns by setting vibrationType to VibrationType.custom, and providing your own pattern and intensities. This gives you full control over the vibration behavior.