Skip to content

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

migrate mouse workaround to webview_windows lib

Predidit39d22b617dfe
diff --git a/lib/pages/video/video_page.dart b/lib/pages/video/video_page.dart
index 7741d787..5053231d 100644
--- a/lib/pages/video/video_page.dart
+++ b/lib/pages/video/video_page.dart
@@ -8,6 +8,7 @@ import 'package:kazumi/pages/video/video_controller.dart';
import 'package:kazumi/pages/webview/webview_item.dart';
import 'package:kazumi/pages/history/history_controller.dart';
import 'package:kazumi/pages/webview_desktop/webview_desktop_item.dart';
+import 'package:kazumi/pages/webview_desktop/webview_desktop_controller.dart';
import 'package:kazumi/pages/player/player_item.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:hive/hive.dart';
@@ -211,29 +212,16 @@ class _VideoPageState extends State<VideoPage>
/// workaround for webview_windows
/// The webview_windows component cannot be removed from the widget tree; otherwise, it can never be reinitialized.
- /// The height of the webview_windows component cannot be set to 0; otherwise, it will intercept click events across the entire screen.
- Platform.isWindows
- ? Positioned(
- child: Opacity(
- opacity: (videoPageController.loading ||
- videoPageController.currentPlugin.useNativePlayer)
- ? 0.0
- : 1.0,
- child: SizedBox(
- height: (videoPageController.loading ||
- videoPageController
- .currentPlugin.useNativePlayer)
- ? 1
- : null,
- child: const WebviewDesktopItem())))
- : Positioned(
- child: SizedBox(
- height: (videoPageController.loading ||
- videoPageController.currentPlugin.useNativePlayer)
- ? 0
- : null,
- child: const WebviewItem(),
- ))
+ Positioned(
+ child: SizedBox(
+ height: (videoPageController.loading ||
+ videoPageController.currentPlugin.useNativePlayer)
+ ? 0
+ : null,
+ child: Platform.isWindows
+ ? const WebviewDesktopItem()
+ : const WebviewItem(),
+ ))
],
);
}
diff --git a/pubspec.lock b/pubspec.lock
index 9515357a..9f86e302 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -1383,7 +1383,7 @@ packages:
description:
path: "."
ref: main
- resolved-ref: "571e96e93de6df4a9f8bc1ddbcdb75d0cfc8d5b1"
+ resolved-ref: aa3d50ec2da6802dd1f04407e249afcfa2fdebcd
url: "https://github.com/Predidit/flutter-webview-windows.git"
source: git
version: "0.4.0"