creativecreatorormaybenot
Committed by GitHub

Publish wakelock_windows (#99)

* Temporarily remove Windows dep

* Format

* Update Pubspec :)
... ... @@ -2,7 +2,6 @@ import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:wakelock_macos/wakelock_macos.dart';
import 'package:wakelock_windows/wakelock_windows.dart';
import 'package:wakelock_platform_interface/wakelock_platform_interface.dart';
/// The [WakelockPlatformInterface] that is used by [Wakelock].
... ... @@ -21,12 +20,12 @@ var wakelockPlatformInstance = !kIsWeb &&
// on web.
Platform.isMacOS
? WakelockMacOS()
// This doesn't feel like the correct way to assign the windows implementation,
// but platform channels aren't used due to the win32 package.
// See this issue for details: https://github.com/flutter/flutter/issues/52267.
: (!kIsWeb && Platform.isWindows
? WakelockWindows()
: WakelockPlatformInterface.instance);
// This does not feel like the correct way to assign the Windows
// implementation, however, the platform channels do not have to be used
// thanks to the win32 package. See https://github.com/flutter/flutter/issues/52267.
// : (!kIsWeb && Platform.isWindows)
// ? WakelockWindows()
: WakelockPlatformInterface.instance;
/// Class providing all wakelock functionality using static members.
///
... ...
name: wakelock
description: >-2
Plugin that allows you to keep the device screen awake, i.e. prevent the screen from sleeping on
Android, iOS, macOS, Windows and web.
Android, iOS, macOS, Windows, and web.
version: 0.4.0
homepage: https://github.com/creativecreatorormaybenot/wakelock/tree/master/wakelock
... ... @@ -16,7 +16,7 @@ dependencies:
meta: ^1.2.0
wakelock_macos: ^0.1.0
wakelock_windows: ^0.1.0
# wakelock_windows: ^0.1.0
wakelock_platform_interface: ^0.2.0
wakelock_web: ^0.2.0
... ... @@ -37,7 +37,7 @@ flutter:
pluginClass: WakelockPlugin
macos:
default_package: wakelock_macos
windows:
default_package: wakelock_windows
# windows:
# default_package: wakelock_windows
web:
default_package: wakelock_web
... ...
... ... @@ -21,3 +21,8 @@ dev_dependencies:
pedantic: ^1.11.0
# todo: use dartPluginClass declaration once that lands on stable (https://github.com/flutter/flutter/issues/52267_
#flutter:
# plugin:
# platforms:
# windows:
# dartPluginClass: WakelockWindows
... ...