idle_detector_wrapper
1.2.1, released a year ago by an unverified publisher
Detects user idle state with support for web scrolling, mouse movement, touch, and keyboard input.
What it does
Wraps a Flutter widget to monitor user activity such as mouse movements, scrolling, touch gestures, and keyboard input. It triggers callbacks when the user becomes idle or active again, and optionally persists timestamps across app restarts using SharedPreferences.
AI-written summary of version 1.2.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to detect user inactivity for session timeouts or auto-locking.
- You are building a Flutter Web app where standard idle detectors miss mouse wheel scrolling.
- You want idle states to persist across application restarts.
Skip it when
- You need complex state management for non-idle related app logic.
- Your application requires a completely headless service without wrapping widgets.
Strengths
- Comprehensive web scroll support which is often missed in other idle detectors.
- Optional session continuity via SharedPreferences timestamp persistence.
- Configurable keyboard and mouse event detection per platform.
Weaknesses
- Requires wrapping widgets in an IdleDetector tree.
- Keyboard detection defaults vary by platform and might need manual tuning.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
IdleDetector(
idleTime: const Duration(seconds: 30),
onIdle: () => print('User is idle'),
onActive: () => print('User is active'),
child: MyAppWidget(),
)Alternatives
Packages that do the same job and could replace idle_detector_wrapper.
- shake_gesture
Detect shake gestures in Flutter apps on Android and iOS.
84Compare - root_checker_plus
Flutter plugin for Android root detection and iOS jailbreak detection.
67Compare
Works with
Packages commonly used together with idle_detector_wrapper: ones it builds on, ones built on it, and its own family.