Skip to content

feat: show a hover-time indicator on the progress bar - #956

Open
Ortes wants to merge 2 commits into
fluttercommunity:masterfrom
Ortes:feat/progress-bar-hover-time
Open

feat: show a hover-time indicator on the progress bar#956
Ortes wants to merge 2 commits into
fluttercommunity:masterfrom
Ortes:feat/progress-bar-hover-time

Conversation

@Ortes

@Ortes Ortes commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a small floating time indicator to the Material progress bar. While the pointer hovers (or drags) the bar, a pill shows the timecode at that position, so the user can see exactly where a click or seek will jump to — the behaviour people expect from YouTube/Netflix-style scrubbers.

The pill is rendered as an overlay above the bar and follows the pointer horizontally, clamped to the bar's width, with a small caret pointing at the exact spot. It uses the existing formatDuration helper, so it matches the position / duration label already shown in the controls.

Behaviour

  • Only shows once the video is initialized and its duration is known.
  • Driven by hover events, so it never appears on touch devices (which don't emit hover) — mobile behaviour is unchanged. It does also track an in-progress drag, which gives touch users seek feedback while scrubbing.
  • Purely additive and self-contained in progress_bar.dart; no public API changes.

Notes

Scoped intentionally to the hover-time readout only — it does not set the hover cursor (that is handled separately in #950).

Display a small floating pill with the timecode under the pointer while
it hovers (or drags) the Material progress bar, so the user can see the
exact position a click or seek will jump to.

The pill is rendered as an overlay above the bar and follows the pointer
horizontally, clamped to the bar's width. It only appears once the video
is initialized and, because it is driven by hover events, never shows on
touch devices.
@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 11.11111% with 72 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.71%. Comparing base (69a8fc7) to head (c0f2c74).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
lib/src/progress_bar.dart 11.11% 72 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #956      +/-   ##
==========================================
- Coverage   43.82%   42.71%   -1.11%     
==========================================
  Files          21       21              
  Lines        1602     1660      +58     
==========================================
+ Hits          702      709       +7     
- Misses        900      951      +51     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant