Detect User Inactivity in Flutter (Idle ...

Detect User Inactivity in Flutter (Idle Detector Wrapper)

Jul 27, 2025

In some apps, knowing when a user is inactive is just as important as knowing when they're active.

That’s why I created a simple wrapper to detect idle time in Flutter:

📦 idle_detector_wrapper on pub.dev

✅ Track user inactivity easily
✅ Works with mouse, keyboard, and touch
✅ Great for auto-logout, screen dimming, or inactivity prompts

Example:

dart

CopyEdit

IdleDetectorWrapper( onIdle: () => print("User is idle"), idleDuration: Duration(minutes: 5), child: YourApp(), )

Still early — I’m open to feedback, suggestions, or even critiques!

If you found it helpful and want to support my work:
👉 buymeacoffee.com/robmoonshoz

Vous aimez cette publication ?

Achetez un café à Robert Cumahig

Plus de Robert Cumahig

ConfidentialitéConditionsSignaler