refresh_rate 2.0.0 copy "refresh_rate: ^2.0.0" to clipboard
refresh_rate: ^2.0.0 copied to clipboard

Request display refresh rates, measure Flutter frame cadence and phase timings, and export source-qualified benchmark reports and telemetry.

example/lib/main.dart

import 'package:flutter/widgets.dart';
import 'package:refresh_rate/refresh_rate.dart';

import 'src/example_app.dart';
export 'src/example_app.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const RefreshRateExampleApp());
  // The engine may register plugins before attaching its rendering surface.
  // Start the app first, then inspect the supported backend after its first frame.
  WidgetsBinding.instance.addPostFrameCallback((_) async {
    final result = await RefreshRate.enable();
    debugPrint('Refresh preference: ${result.status.name} (${result.backend})');
    // An unavailable Android surface is reapplied by native attachment callbacks.
    // Apple/desktop/web control support is reported separately from display Hz.
  });
}
21
likes
160
points
2.97k
downloads
screenshot

Documentation

API reference

Publisher

verified publisherafewgoodcoders.com

Weekly Downloads

Request display refresh rates, measure Flutter frame cadence and phase timings, and export source-qualified benchmark reports and telemetry.

Homepage
Repository (GitHub)
View/report issues

Topics

#display #performance #animation #debug #ui

License

BSD-3-Clause (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface, web

More

Packages that depend on refresh_rate

Packages that implement refresh_rate