Epic: #170
Depends on: 0.4.3 shipped (can run parallel with #173–#172)
Source: docs/motion-and-high-refresh.md §3
Goal
Unlock native display refresh rate (90/120/144 Hz) where the engine/OS caps at 60, and add diagnostics to prove real Hz on each platform.
Files
lib/main.dart — call unlock after WidgetsFlutterBinding.ensureInitialized()
lib/core/motion/display_refresh.dart (new wrapper around refresh_rate package)
pubspec.yaml — add refresh_rate dependency
- Optional: debug overlay gated by
kDebugMode or hidden flag
Implementation
- Add
refresh_rate package; thin DisplayRefreshService with enable(), queryHz(), disable().
- Call
enable() / preferMax() once in main() on desktop.
- macOS 14+: primary unlock target (ProMotion/high-Hz).
- Windows / Linux: query and log active Hz; verify engine follows monitor (no unlock API needed per research).
- Debug-only FPS/Hz overlay (e.g.
refresh_rate showHz()) behind a compile-time or runtime flag — not in release UI.
- Document measured Hz per OS in issue comment or A6 doc.
Acceptance Criteria
References
Epic: #170
Depends on: 0.4.3 shipped (can run parallel with #173–#172)
Source:
docs/motion-and-high-refresh.md§3Goal
Unlock native display refresh rate (90/120/144 Hz) where the engine/OS caps at 60, and add diagnostics to prove real Hz on each platform.
Files
lib/main.dart— call unlock afterWidgetsFlutterBinding.ensureInitialized()lib/core/motion/display_refresh.dart(new wrapper aroundrefresh_ratepackage)pubspec.yaml— addrefresh_ratedependencykDebugModeor hidden flagImplementation
refresh_ratepackage; thinDisplayRefreshServicewithenable(),queryHz(),disable().enable()/preferMax()once inmain()on desktop.refresh_rateshowHz()) behind a compile-time or runtime flag — not in release UI.Acceptance Criteria
flutter analyzeclean; tests green.References
flutter/flutter#160952