Activsy is a Flutter/Dart package that detects periods of inactivity within an application, triggering reactions when no user interactions occur. It monitors user activity across multiple platforms—including Android, iOS, Web, macOS, Windows, and Linux—making it ideal for implementing idle timers, auto-logout features, or screen dimming. The package provides a simple API to define inactivity thresholds and execute callbacks when the user becomes inactive. It's lightweight and integrates seamlessly into existing Flutter projects.
Use cases
- Auto-logout after inactivity
- Idle session detection
- Screen timeout management
- User engagement tracking
- Prevent unauthorized access during idle time
Key features
- Cross-platform support
- Configurable inactivity threshold
- Callback on inactivity
- Lightweight and easy to integrate
- Real-time activity monitoring
Suitable for
- Apps requiring session security
- Kiosk or public-facing applications
- Time-sensitive user interfaces
- Applications with idle state logic
Considerations
- May require permission on some platforms
- Battery usage depends on polling frequency
- Not suitable for high-frequency activity tracking
- Requires careful handling of background states
- Initial setup may need platform-specific configuration