Repository navigation
Closed
Labels
P3Low priority / Polish & EnhancementsLow priority / Polish & EnhancementsenhancementNew feature or requestNew feature or requestmotionAnimation system, transitions, motion tokensAnimation system, transitions, motion tokens
Description
Summary
third_party/refresh_rate is a vendored copy of refresh_rate 1.0.2 kept only for two build fixes. Upstream 2.0.1 appears to fix both natively, so the fork can likely be dropped in favour of refresh_rate: ^2.0.1.
Why the fork exists vs. 2.0.1
| Reason for the fork | In 2.0.1 |
|---|---|
Linux -Werror: uninitialized rates[0] |
Linux plugin rewritten on generated Pigeon GObject bindings; the hand-rolled rates array is gone |
macOS SPM: Package.swift pointed at ../Classes, outside the package root (#555) |
Package.swift uses path: "Sources/refresh_rate" inside the package |
App compatibility
Only lib/core/motion/display_refresh_service.dart uses the package.
RefreshRate.enable()now returnsFuture<RateRequestResult>; we call it unawaited (wrap inunawaited(...)if the lint is on).showHz()andinfo.{currentRate,maxRate,isVariableRefreshRate}are source-compatible.DisplayRefreshService.currentHz/maxHzhave no other callers.
Behaviour changes: on Linux maxRate is 0.0 (was max across monitors) and unknown values no longer fall back to 60 Hz. info is populated asynchronously, so the first debug log may show 0 Hz.
Tasks
- Verify the package publisher:
repositorymoved fromqoder-official/refresh_ratetoafewgoodcoders/refresh_ratewhile the Android package is stillin.qoder.refresh_rate. Confirm it is a legitimate transfer and skim the native diff 1.0.2 → 2.0.1 (Windows and macOS changed too). -
pubspec.yaml:refresh_rate: ^2.0.1, remove therefresh_rateentry fromdependency_overrides. - Delete
third_party/refresh_rate/and updatethird_party/README.mdif it references it. - CI green on Linux (
-Werror), Windows and macOS. - Follow-up, separate PR: reconsider
flutter.config.enable-swift-package-manager: false. It disables SPM for all plugins, not just this one.
Fallback
If the Linux -Werror build or Windows/macOS breaks on upstream 2.0.1, keep the fork and re-vendor 2.0.1 with only the needed patch.
Found during the dependency review.
Metadata
Metadata
Assignees
Labels
P3Low priority / Polish & EnhancementsLow priority / Polish & EnhancementsenhancementNew feature or requestNew feature or requestmotionAnimation system, transitions, motion tokensAnimation system, transitions, motion tokens
Activity
deps: refresh_rate 2.0.1 from pub.dev replaces the vendored 1.0.2 fork (
ZhuchkaTriplesix commentedon Oct 25, 2026
Fixed on dev by 64f7bad: deps: refresh_rate 2.0.1 from pub.dev replaces the vendored 1.0.2 fork (#1584) (#1725). It reaches main with the next dev to main merge (closed after checking the code and its tests).