diff --git a/lib/app/modules/play/views/webview_view.dart b/lib/app/modules/play/views/webview_view.dart index 1b96148..e88754c 100644 --- a/lib/app/modules/play/views/webview_view.dart +++ b/lib/app/modules/play/views/webview_view.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:movie/utils/screen_helper.dart'; -import 'package:wakelock/wakelock.dart'; +import 'package:wakelock_plus/wakelock_plus.dart'; import 'package:webview_flutter/webview_flutter.dart'; class WebviewView extends StatefulWidget { @@ -19,7 +19,7 @@ class _WebviewViewState extends State { @override void initState() { - Wakelock.enable(); + WakelockPlus.enable(); execScreenDirction(ScreenDirction.x); init(); super.initState(); @@ -36,7 +36,7 @@ class _WebviewViewState extends State { @override void dispose() { super.dispose(); - Wakelock.disable(); + WakelockPlus.disable(); execScreenDirction(ScreenDirction.y); } diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 8c0e9fb..c81083c 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -14,7 +14,6 @@ import share_plus import sqflite import url_launcher_macos import video_player_avfoundation -import wakelock_macos import wakelock_plus func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { @@ -27,6 +26,5 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin")) - WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin")) WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index d0bcc50..53ccae6 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1251,32 +1251,8 @@ packages: url: "https://pub.dev" source: hosted version: "14.2.1" - wakelock: - dependency: "direct main" - description: - name: wakelock - sha256: "78bad4822be81d37e7bc34b6990da7dface2a445255cd37c6f053b51a4ccdb3b" - url: "https://pub.dev" - source: hosted - version: "0.4.0" - wakelock_macos: - dependency: transitive - description: - name: wakelock_macos - sha256: "73581e5d9ed2dd1ba951375c30e63f0eb8c58d7d6286ae9ddf927b88f2aea8d9" - url: "https://pub.dev" - source: hosted - version: "0.1.0+3" - wakelock_platform_interface: - dependency: transitive - description: - name: wakelock_platform_interface - sha256: d0a8a1c02af68077db5df1e0f5e2b745f7b1f2cdcc48e3e0b6f8f4dcc349050e - url: "https://pub.dev" - source: hosted - version: "0.2.1+3" wakelock_plus: - dependency: transitive + dependency: "direct main" description: name: wakelock_plus sha256: "14758533319a462ffb5aa3b7ddb198e59b29ac3b02da14173a1715d65d4e6e68" @@ -1291,14 +1267,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.1" - wakelock_web: - dependency: transitive - description: - name: wakelock_web - sha256: "06b0033d5421712138e7fa482ff5c6280fe12e0a41c40c3fe8fda2c007eb4348" - url: "https://pub.dev" - source: hosted - version: "0.2.0+3" watcher: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 7892b04..fe97d31 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -30,7 +30,7 @@ dependencies: path_provider: ^2.1.3 # flutter_html: ^2.1.5 clipboard: ^0.1.3 - wakelock: ^0.4.0 + wakelock_plus: ^1.2.5 desktop_webview_window: ^0.2.3 bitsdojo_window: git: