Add platform check for high fps call
This commit is contained in:
parent
fb535c9eb4
commit
4f55aa2536
@ -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)
|
||||||
|
if (defaultTargetPlatform == TargetPlatform.android) {
|
||||||
await FlutterDisplayMode.setHighRefreshRate();
|
await FlutterDisplayMode.setHighRefreshRate();
|
||||||
|
}
|
||||||
|
|
||||||
// Localizations
|
// Localizations
|
||||||
await localeLogic.load();
|
await localeLogic.load();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user