Skip to content

Commit

Permalink
Merge pull request #63 from jerichoi224/feat/add-120hz
Browse files Browse the repository at this point in the history
feat: add 120hz
  • Loading branch information
jerichoi224 authored Nov 26, 2023
2 parents be3adcd + 99c4989 commit cce8bb5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:device_info_plus/device_info_plus.dart';
import 'package:flex_color_scheme/flex_color_scheme.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter_displaymode/flutter_displaymode.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:photo_manager/photo_manager.dart';

Expand Down Expand Up @@ -65,7 +66,12 @@ class _MainState extends State<MainApp> {
checkPermission();
}

Future<void> initialize() async {
await FlutterDisplayMode.setHighRefreshRate();
}

Future<void> checkPermission() async {
await initialize();
bool permitted = false;
var androidInfo = await DeviceInfoPlugin().androidInfo;
final PermissionState ps = await PhotoManager.requestPermissionExtend();
Expand Down
8 changes: 8 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,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_lints:
dependency: "direct dev"
description:
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 0.5.2+1
version: 0.5.3+1

environment:
sdk: '>=2.19.3 <3.0.0'
Expand Down Expand Up @@ -52,6 +52,7 @@ dependencies:
url_launcher: ^6.1.14
flutter_spinkit: ^5.2.0
reorderable_grid: ^1.0.8
flutter_displaymode: ^0.6.0

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit cce8bb5

Please sign in to comment.