mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
Fixed setting high refresh rate crash ios release build
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user