shake_gesture
2.2.1, released 4 weeks ago by helloprimary.care
Detect shake gestures in Flutter apps on Android and iOS.
What it does
Provides a Flutter widget and imperative API to detect shake gestures on Android and iOS devices. It allows executing callbacks when a shake gesture is performed, and works on simulators as well.
AI-written summary of version 2.2.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to trigger a feature or debug menu via a shake gesture on mobile devices.
- You need a drop-in widget or imperative callback for shake detection.
Skip it when
- You need custom shake sensitivity specifically on iOS devices.
- You are building for desktop or web platforms.
Strengths
- Supports both widget and imperative usage.
- Works on iOS and Android simulators.
- Includes test helpers for testing shake detection.
Weaknesses
- Shake gestures cannot be customized on iOS.
- Limited platform support (only Android and iOS).
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Optional customization can be done via AndroidManifest.xml for Android shake force and count.
ShakeGesture(
onShake: () {
print('Shake!');
},
child: const Text('Shake me'),
)Alternatives
Packages that do the same job and could replace shake_gesture.
- web_browser_detect
Detect which browser and version is in use on Flutter Web.
79Compare - root_checker_plus
Flutter plugin for Android root detection and iOS jailbreak detection.
67Compare - shake_detector
Detect phone shake gestures with pause/resume and optional widget wrapper
49Compare - flutter_rasp
Runtime application self-protection for Flutter to detect root, emulators, debuggers, and SSL pinning.
62Compare