Committed by
GitHub
Publish wakelock_windows (#99)
* Temporarily remove Windows dep * Format * Update Pubspec :)
Showing
3 changed files
with
15 additions
and
11 deletions
| @@ -2,7 +2,6 @@ import 'dart:io'; | @@ -2,7 +2,6 @@ import 'dart:io'; | ||
| 2 | 2 | ||
| 3 | import 'package:flutter/foundation.dart'; | 3 | import 'package:flutter/foundation.dart'; |
| 4 | import 'package:wakelock_macos/wakelock_macos.dart'; | 4 | import 'package:wakelock_macos/wakelock_macos.dart'; |
| 5 | -import 'package:wakelock_windows/wakelock_windows.dart'; | ||
| 6 | import 'package:wakelock_platform_interface/wakelock_platform_interface.dart'; | 5 | import 'package:wakelock_platform_interface/wakelock_platform_interface.dart'; |
| 7 | 6 | ||
| 8 | /// The [WakelockPlatformInterface] that is used by [Wakelock]. | 7 | /// The [WakelockPlatformInterface] that is used by [Wakelock]. |
| @@ -21,12 +20,12 @@ var wakelockPlatformInstance = !kIsWeb && | @@ -21,12 +20,12 @@ var wakelockPlatformInstance = !kIsWeb && | ||
| 21 | // on web. | 20 | // on web. |
| 22 | Platform.isMacOS | 21 | Platform.isMacOS |
| 23 | ? WakelockMacOS() | 22 | ? WakelockMacOS() |
| 24 | - // This doesn't feel like the correct way to assign the windows implementation, | ||
| 25 | - // but platform channels aren't used due to the win32 package. | ||
| 26 | - // See this issue for details: https://github.com/flutter/flutter/issues/52267. | ||
| 27 | - : (!kIsWeb && Platform.isWindows | ||
| 28 | - ? WakelockWindows() | ||
| 29 | - : WakelockPlatformInterface.instance); | 23 | +// This does not feel like the correct way to assign the Windows |
| 24 | +// implementation, however, the platform channels do not have to be used | ||
| 25 | +// thanks to the win32 package. See https://github.com/flutter/flutter/issues/52267. | ||
| 26 | +// : (!kIsWeb && Platform.isWindows) | ||
| 27 | +// ? WakelockWindows() | ||
| 28 | + : WakelockPlatformInterface.instance; | ||
| 30 | 29 | ||
| 31 | /// Class providing all wakelock functionality using static members. | 30 | /// Class providing all wakelock functionality using static members. |
| 32 | /// | 31 | /// |
| 1 | name: wakelock | 1 | name: wakelock |
| 2 | description: >-2 | 2 | description: >-2 |
| 3 | Plugin that allows you to keep the device screen awake, i.e. prevent the screen from sleeping on | 3 | Plugin that allows you to keep the device screen awake, i.e. prevent the screen from sleeping on |
| 4 | - Android, iOS, macOS, Windows and web. | 4 | + Android, iOS, macOS, Windows, and web. |
| 5 | version: 0.4.0 | 5 | version: 0.4.0 |
| 6 | homepage: https://github.com/creativecreatorormaybenot/wakelock/tree/master/wakelock | 6 | homepage: https://github.com/creativecreatorormaybenot/wakelock/tree/master/wakelock |
| 7 | 7 | ||
| @@ -16,7 +16,7 @@ dependencies: | @@ -16,7 +16,7 @@ dependencies: | ||
| 16 | meta: ^1.2.0 | 16 | meta: ^1.2.0 |
| 17 | 17 | ||
| 18 | wakelock_macos: ^0.1.0 | 18 | wakelock_macos: ^0.1.0 |
| 19 | - wakelock_windows: ^0.1.0 | 19 | +# wakelock_windows: ^0.1.0 |
| 20 | wakelock_platform_interface: ^0.2.0 | 20 | wakelock_platform_interface: ^0.2.0 |
| 21 | wakelock_web: ^0.2.0 | 21 | wakelock_web: ^0.2.0 |
| 22 | 22 | ||
| @@ -37,7 +37,7 @@ flutter: | @@ -37,7 +37,7 @@ flutter: | ||
| 37 | pluginClass: WakelockPlugin | 37 | pluginClass: WakelockPlugin |
| 38 | macos: | 38 | macos: |
| 39 | default_package: wakelock_macos | 39 | default_package: wakelock_macos |
| 40 | - windows: | ||
| 41 | - default_package: wakelock_windows | 40 | +# windows: |
| 41 | +# default_package: wakelock_windows | ||
| 42 | web: | 42 | web: |
| 43 | default_package: wakelock_web | 43 | default_package: wakelock_web |
| @@ -21,3 +21,8 @@ dev_dependencies: | @@ -21,3 +21,8 @@ dev_dependencies: | ||
| 21 | pedantic: ^1.11.0 | 21 | pedantic: ^1.11.0 |
| 22 | 22 | ||
| 23 | # todo: use dartPluginClass declaration once that lands on stable (https://github.com/flutter/flutter/issues/52267_ | 23 | # todo: use dartPluginClass declaration once that lands on stable (https://github.com/flutter/flutter/issues/52267_ |
| 24 | +#flutter: | ||
| 25 | +# plugin: | ||
| 26 | +# platforms: | ||
| 27 | +# windows: | ||
| 28 | +# dartPluginClass: WakelockWindows |
-
Please register or login to post a comment