mirror of
https://github.com/gskinnerTeam/flutter-wonderous-app.git
synced 2025-08-01 10:17:10 +08:00
Add platform check for high fps call
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter_displaymode/flutter_displaymode.dart';
|
import 'package:flutter_displaymode/flutter_displaymode.dart';
|
||||||
import 'package:wonders/common_libs.dart';
|
import 'package:wonders/common_libs.dart';
|
||||||
import 'package:wonders/ui/common/utils/page_routes.dart';
|
import 'package:wonders/ui/common/utils/page_routes.dart';
|
||||||
@ -22,7 +23,9 @@ class AppLogic {
|
|||||||
setDeviceOrientation(Axis.vertical);
|
setDeviceOrientation(Axis.vertical);
|
||||||
|
|
||||||
// Set preferred refresh rate to the max possible (the OS may ignore this)
|
// Set preferred refresh rate to the max possible (the OS may ignore this)
|
||||||
await FlutterDisplayMode.setHighRefreshRate();
|
if (defaultTargetPlatform == TargetPlatform.android) {
|
||||||
|
await FlutterDisplayMode.setHighRefreshRate();
|
||||||
|
}
|
||||||
|
|
||||||
// Localizations
|
// Localizations
|
||||||
await localeLogic.load();
|
await localeLogic.load();
|
||||||
|
Reference in New Issue
Block a user