Fix for #158: Add kIsWeb check to instances where we want android-specific behaviors.

This commit is contained in:
Shawn 2024-01-11 10:22:23 -07:00
parent 91c8cb9760
commit bf2c0b2d04
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ class AppLogic {
await AppBitmaps.init(); await AppBitmaps.init();
// 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 (PlatformInfo.isAndroid) { if (!kIsWeb && PlatformInfo.isAndroid) {
await FlutterDisplayMode.setHighRefreshRate(); await FlutterDisplayMode.setHighRefreshRate();
} }

View File

@ -12,7 +12,7 @@ class AppHaptics {
static void buttonPress() { static void buttonPress() {
// Android/Fuchsia expect haptics on all button presses, iOS does not. // Android/Fuchsia expect haptics on all button presses, iOS does not.
if (PlatformInfo.isAndroid) { if (!kIsWeb && PlatformInfo.isAndroid) {
lightImpact(); lightImpact();
} }
} }