Overview
Shake is a Flutter package that detects when a user shakes their device, enabling interactive features based on motion. It allows customization of the G-force threshold for detecting shakes and sets a reset period to prevent repeated triggers. Designed for Android, iOS, and Web platforms, it integrates seamlessly into apps requiring gesture-based interactions. The package is lightweight and efficient, ideal for triggering actions like undoing an operation, refreshing content, or activating hidden menus through physical movement.
Use cases
- Triggering undo actions
- Refreshing content with a shake
- Activating hidden app features
- Gamification via motion input
- Quick settings toggles
Key features
- Adjustable G-force sensitivity
- Configurable reset period
- Cross-platform support (Android, iOS, Web)
- Simple event-driven API
- Low latency motion detection
Suitable for
- Gesture-based mobile apps
- Interactive UIs with motion controls
- Games requiring shake gestures
- Accessibility features using motion
- Apps needing quick action triggers
Considerations
- May require calibration for different devices
- Potential false positives in high-motion environments
- Battery usage increases with continuous monitoring
- Web support limited to devices with accelerometer access
- Not suitable for precise motion tracking