Skip to content

Commit

Permalink
opt.:try add high refresh rate support
Browse files Browse the repository at this point in the history
  • Loading branch information
dccif committed Dec 28, 2023
1 parent 5284cee commit 1d9894c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_displaymode/flutter_displaymode.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:logging/logging.dart';
import 'package:provider/provider.dart';
Expand Down Expand Up @@ -93,6 +94,8 @@ Future<void> _initApp() async {
}
// SharedPreferences is only used on Android for saving home widgets settings.
SharedPreferences.setPrefix('');
// try switch to highest refresh rate
await FlutterDisplayMode.setHighRefreshRate();
}
if (isIOS || isMacOS) {
if (Stores.setting.icloudSync.fetch()) ICloud.sync();
Expand Down
8 changes: 8 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_displaymode:
dependency: "direct main"
description:
name: flutter_displaymode
sha256: "42c5e9abd13d28ed74f701b60529d7f8416947e58256e6659c5550db719c57ef"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
flutter_highlight:
dependency: "direct main"
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ dependencies:
ref: main
url: https://github.com/lollipopkit/webdav_client
window_manager: ^0.3.7
flutter_displaymode: ^0.6.0

dev_dependencies:
flutter_native_splash: ^2.1.6
Expand Down

0 comments on commit 1d9894c

Please sign in to comment.