Overview
The in_app_idle_detector package is a cross-platform Flutter plugin that detects user inactivity (idle state) across Android, iOS, Web, macOS, Windows, and Linux. It monitors user interactions such as touch, mouse movements, and keyboard input to determine when the user has been inactive for a specified duration. This enables developers to trigger actions like screen timeouts, session expirations, or automatic logout features. The plugin is lightweight and integrates seamlessly into existing Flutter applications without requiring native code changes.
Use cases
- Automatic session timeout
- User activity tracking
- Idle screen lock
- Prevent unauthorized access
- Auto-logout after inactivity
Key features
- Cross-platform support
- Real-time idle detection
- Configurable idle duration
- No native code required
- Simple API integration
Suitable for
- Security-sensitive apps
- Time-based session management
- Kiosk or public terminal apps
- Apps requiring user engagement monitoring
Considerations
- May consume minor battery on long-running apps
- Requires permission on some platforms
- Behavior may vary slightly between platforms
- Not suitable for high-precision timing needs
