diff --git a/lib/plugin/pl_player/utils/fullscreen.dart b/lib/plugin/pl_player/utils/fullscreen.dart index ef490e712..7350b5ebf 100644 --- a/lib/plugin/pl_player/utils/fullscreen.dart +++ b/lib/plugin/pl_player/utils/fullscreen.dart @@ -94,15 +94,18 @@ Future? showSystemBar() { Future setEnabledSystemUIMode( SystemUiMode mode, { List? overlays, -}) async { +}) { + if (!Platform.isAndroid) { + return SystemChrome.setEnabledSystemUIMode(mode, overlays: overlays); + } if (mode != SystemUiMode.manual) { - await const MethodChannel('PiliPlus').invokeMethod( + return const MethodChannel('PiliPlus').invokeMethod( 'SystemChrome.setEnabledSystemUIMode', {'arguments': mode.toString()}, ); } else { assert(mode == SystemUiMode.manual && overlays != null); - await const MethodChannel('PiliPlus').invokeMethod( + return const MethodChannel('PiliPlus').invokeMethod( 'SystemChrome.setEnabledSystemUIOverlays', {'arguments': _stringify(overlays!)}, );