Skip to content

fix: replace global GestureDetector with Listener to resolve touch in…#1043

Open
vibhutomer wants to merge 1 commit into
mosip:masterfrom
vibhutomer:fix/gesture-arena-interference
Open

fix: replace global GestureDetector with Listener to resolve touch in…#1043
vibhutomer wants to merge 1 commit into
mosip:masterfrom
vibhutomer:fix/gesture-arena-interference

Conversation

@vibhutomer
Copy link
Copy Markdown

Description

This PR addresses a subtle but impactful UI performance issue caused by the InactivityTracker.

Previously, the app was wrapped in a top-level GestureDetector. Because GestureDetector participates in Flutter's Gesture Arena, it actively competed with child widgets (scroll views, buttons, sliders) for touch events, which can lead to dropped inputs and scroll stuttering.

Changes Made

  • Replaced GestureDetector with Listener in inactivity_tracker.dart.
  • Updated the interaction callbacks to use raw OS-level pointer events (onPointerDown, onPointerMove).
  • Because Listener does not enter the Gesture Arena, the app can now silently track inactivity without interfering with standard UI interactions.

Related Issue

Closes #1042

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance improvement (improves app responsiveness)

Checklist

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings or exceptions.

…terference

Signed-off-by: vibhutomer <vibhutomer25@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 9, 2026

Warning

Rate limit exceeded

@vibhutomer has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 51 minutes and 5 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: beeb54dd-19b2-4e18-8bfc-ca56312063b9

📥 Commits

Reviewing files that changed from the base of the PR and between aef4fb6 and bff25fa.

📒 Files selected for processing (1)
  • lib/utils/inactivity_tracker.dart
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI stutter and dropped touch events due to global GestureDetector in InactivityTracker

1 participant