mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
Fixed setting high refresh rate crash ios release build
This commit is contained in:
parent
7e6ccbad21
commit
339f7f776f
7 changed files with 37 additions and 19 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
@ -51,8 +53,12 @@ void main() async {
|
|||
Locale('it', 'IT'),
|
||||
];
|
||||
|
||||
if (kReleaseMode) {
|
||||
await FlutterDisplayMode.setHighRefreshRate();
|
||||
if (kReleaseMode && Platform.isAndroid) {
|
||||
try {
|
||||
await FlutterDisplayMode.setHighRefreshRate();
|
||||
} catch (e) {
|
||||
debugPrint("Error setting high refresh rate: $e");
|
||||
}
|
||||
}
|
||||
|
||||
runApp(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue