From ba0ff79bd074f547c7996be9833a76c98bc4915c Mon Sep 17 00:00:00 2001 From: violet-dev Date: Sun, 10 Dec 2023 22:21:05 +0900 Subject: [PATCH] ios: Fix viewer full screen error --- lib/pages/viewer/viewer_controller.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/pages/viewer/viewer_controller.dart b/lib/pages/viewer/viewer_controller.dart index c10360235..8adc4a661 100644 --- a/lib/pages/viewer/viewer_controller.dart +++ b/lib/pages/viewer/viewer_controller.dart @@ -1,6 +1,8 @@ // This source code is a part of Project Violet. // Copyright (C) 2020-2023. violet-team. Licensed under the Apache-2.0 License. +import 'dart:io'; + import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -214,14 +216,14 @@ class ViewerController extends GetxController { if (!overlay.value) { overlay.value = !overlay.value; opacity.value = 1.0; - if (!Settings.disableFullScreen) { + if (!Settings.disableFullScreen || Platform.isIOS) { SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [ SystemUiOverlay.top, SystemUiOverlay.bottom, ]); } } else { - if (!Settings.disableFullScreen) { + if (!Settings.disableFullScreen || Platform.isIOS) { SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []); } opacity.value = 0.0;