Skip to content

Commit

Permalink
use wakelock_plus dependencies
Browse files Browse the repository at this point in the history
解决依赖问题
  • Loading branch information
d1y committed Jun 21, 2024
1 parent bdd10f6 commit 30c1ba4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 39 deletions.
6 changes: 3 additions & 3 deletions lib/app/modules/play/views/webview_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -19,7 +19,7 @@ class _WebviewViewState extends State<WebviewView> {

@override
void initState() {
Wakelock.enable();
WakelockPlus.enable();
execScreenDirction(ScreenDirction.x);
init();
super.initState();
Expand All @@ -36,7 +36,7 @@ class _WebviewViewState extends State<WebviewView> {
@override
void dispose() {
super.dispose();
Wakelock.disable();
WakelockPlus.disable();
execScreenDirction(ScreenDirction.y);
}

Expand Down
2 changes: 0 additions & 2 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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"))
}
34 changes: 1 addition & 33 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 30c1ba4

Please sign in to comment.