Skip to content

Commit

Permalink
Replaced wakelock with wakelock_plus
Browse files Browse the repository at this point in the history
  • Loading branch information
nrubin29 committed May 15, 2024
1 parent 8735be7 commit cec920b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 63 deletions.
6 changes: 3 additions & 3 deletions lib/widgets/scrobble/listen_continuously_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:finale/widgets/settings/listen_continuously_settings_view.dart';
import 'package:flutter/material.dart';
import 'package:flutter_acrcloud/flutter_acrcloud.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
import 'package:wakelock/wakelock.dart';
import 'package:wakelock_plus/wakelock_plus.dart';

enum ListenContinuouslyTrackStatus {
listening,
Expand Down Expand Up @@ -84,7 +84,7 @@ class _ListenContinuouslyViewState extends State<ListenContinuouslyView> {
@override
void initState() {
super.initState();
Wakelock.enable();
WakelockPlus.enable();
_listenContinuously();
}

Expand Down Expand Up @@ -195,6 +195,6 @@ class _ListenContinuouslyViewState extends State<ListenContinuouslyView> {
@override
void dispose() {
super.dispose();
Wakelock.disable();
WakelockPlus.disable();
}
}
4 changes: 2 additions & 2 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import share_plus
import shared_preferences_foundation
import sqflite
import url_launcher_macos
import wakelock_macos
import wakelock_plus

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin"))
Expand All @@ -28,5 +28,5 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin"))
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
}
55 changes: 10 additions & 45 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -419,15 +419,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.3.0"
gallery_saver:
dependency: "direct overridden"
description:
path: "."
ref: patch-1
resolved-ref: ba1085bc4a9c5b90940147b358f88556316f66c6
url: "https://github.com/Zazo032/gallery_saver.git"
source: git
version: "2.4.0"
glob:
dependency: transitive
description:
Expand Down Expand Up @@ -525,10 +516,10 @@ packages:
dependency: transitive
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
url: "https://pub.dev"
source: hosted
version: "0.6.7"
version: "0.7.1"
json_annotation:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1182,48 +1173,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "14.2.1"
wakelock:
wakelock_plus:
dependency: "direct main"
description:
path: wakelock
ref: HEAD
resolved-ref: e90322e189243d2101b6298edaf00a04321c3d50
url: "https://github.com/formigas/wakelock.git"
source: git
version: "0.6.2"
wakelock_macos:
dependency: transitive
description:
name: wakelock_macos
sha256: "047c6be2f88cb6b76d02553bca5a3a3b95323b15d30867eca53a19a0a319d4cd"
url: "https://pub.dev"
source: hosted
version: "0.4.0"
wakelock_platform_interface:
dependency: transitive
description:
name: wakelock_platform_interface
sha256: "1f4aeb81fb592b863da83d2d0f7b8196067451e4df91046c26b54a403f9de621"
name: wakelock_plus
sha256: "14758533319a462ffb5aa3b7ddb198e59b29ac3b02da14173a1715d65d4e6e68"
url: "https://pub.dev"
source: hosted
version: "0.3.0"
wakelock_web:
version: "1.2.5"
wakelock_plus_platform_interface:
dependency: transitive
description:
name: wakelock_web
sha256: "1b256b811ee3f0834888efddfe03da8d18d0819317f20f6193e2922b41a501b5"
name: wakelock_plus_platform_interface
sha256: "422d1cdbb448079a8a62a5a770b69baa489f8f7ca21aef47800c726d404f9d16"
url: "https://pub.dev"
source: hosted
version: "0.4.0"
wakelock_windows:
dependency: "direct overridden"
description:
path: wakelock_windows
ref: HEAD
resolved-ref: e90322e189243d2101b6298edaf00a04321c3d50
url: "https://github.com/formigas/wakelock.git"
source: git
version: "0.2.1"
version: "1.2.1"
watcher:
dependency: transitive
description:
Expand Down
14 changes: 1 addition & 13 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies:
universal_io: ^2.2.2
url_launcher: ^6.2.6
visibility_detector: ^0.4.0+2
wakelock: ^0.6.2
wakelock_plus: ^1.2.5
workmanager: ^0.5.2

dev_dependencies:
Expand All @@ -58,18 +58,6 @@ dev_dependencies:
dependency_overrides:
flutter_launcher_icons:
git: https://github.com/fluttercommunity/flutter_launcher_icons.git
gallery_saver:
git:
url: https://github.com/Zazo032/gallery_saver.git
ref: patch-1
wakelock:
git:
url: https://github.com/formigas/wakelock.git
path: wakelock
wakelock_windows:
git:
url: https://github.com/formigas/wakelock.git
path: wakelock_windows

flutter:
uses-material-design: true
Expand Down

0 comments on commit cec920b

Please sign in to comment.