Skip to content

基于自定义规则的番剧采集APP,支持流媒体在线观看,支持弹幕,支持实时超分辨率。

better status bar immersion

Predidit9bdf75a45c1d
diff --git a/lib/pages/video/video_page.dart b/lib/pages/video/video_page.dart
index 290b504a..75917eb4 100644
--- a/lib/pages/video/video_page.dart
+++ b/lib/pages/video/video_page.dart
@@ -41,14 +41,13 @@ class _VideoPageState extends State<VideoPage>
void initState() {
super.initState();
WakelockPlus.enable();
- // without that, color blocks will appear on the left and right sides of the screen when the video is fullscreen
- if (Platform.isIOS) {
- SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
- systemNavigationBarColor: Colors.black,
- systemNavigationBarDividerColor: Colors.black,
- statusBarColor: Colors.black,
- ));
- }
+ // if (Platform.isAndroid || Platform.isIOS) {
+ // SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
+ // systemNavigationBarColor: Colors.black,
+ // systemNavigationBarDividerColor: Colors.black,
+ // statusBarColor: Colors.black,
+ // ));
+ // }
videoPageController.currentEspisode = 1;
videoPageController.currentRoad = 0;
videoPageController.historyOffset = 0;
@@ -75,13 +74,13 @@ class _VideoPageState extends State<VideoPage>
@override
void dispose() {
- if (Platform.isIOS) {
- SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
- systemNavigationBarColor: Colors.transparent,
- systemNavigationBarDividerColor: Colors.transparent,
- statusBarColor: Colors.transparent,
- ));
- }
+ // if (Platform.isAndroid || Platform.isIOS) {
+ // SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
+ // systemNavigationBarColor: Colors.transparent,
+ // systemNavigationBarDividerColor: Colors.transparent,
+ // statusBarColor: Colors.transparent,
+ // ));
+ // }
try {
playerController.mediaPlayer.dispose();
} catch (_) {}
@@ -98,16 +97,16 @@ class _VideoPageState extends State<VideoPage>
offset: videoPageController.historyOffset);
}
});
- return SafeArea(
- child: Observer(builder: (context) {
- return Scaffold(
- appBar: ((videoPageController.currentPlugin.useNativePlayer ||
- videoPageController.androidFullscreen)
- ? null
- : SysAppBar(
- title: Text(videoPageController.title),
- )),
- body: (Utils.isTablet() &&
+ return Observer(builder: (context) {
+ return Scaffold(
+ appBar: ((videoPageController.currentPlugin.useNativePlayer ||
+ videoPageController.androidFullscreen)
+ ? null
+ : SysAppBar(
+ title: Text(videoPageController.title),
+ )),
+ body: SafeArea(
+ child: (Utils.isTablet() &&
MediaQuery.of(context).size.height <
MediaQuery.of(context).size.width)
? Row(
@@ -150,9 +149,9 @@ class _VideoPageState extends State<VideoPage>
))
],
),
- );
- }),
- );
+ ),
+ );
+ });
}
Widget get playerBody {
@@ -230,7 +229,9 @@ class _VideoPageState extends State<VideoPage>
: null,
child: Platform.isWindows
? const WebviewDesktopItem()
- : (Platform.isLinux ? const WebviewLinuxItem() : const WebviewItem()),
+ : (Platform.isLinux
+ ? const WebviewLinuxItem()
+ : const WebviewItem()),
))
],
);