Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
flutter_wakelock
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
creativecreatorormaybenot
2021-03-07 16:23:39 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2021-03-07 16:23:39 +0000
Commit
5fde40b8da3175ef623423c76edbb83bbf4c407f
5fde40b8
1 parent
3d905a22
Fix broken web builds due to FFI imports (#103)
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
2 deletions
wakelock/CHANGELOG.md
wakelock/lib/src/windows_stub.dart
wakelock/lib/wakelock.dart
wakelock/pubspec.yaml
wakelock/CHANGELOG.md
View file @
5fde40b
## 0.5.0+1
*
Fixed broken web builds due to FFI imports.
## 0.5.0
*
Added Windows support 🚀
...
...
wakelock/lib/src/windows_stub.dart
0 → 100644
View file @
5fde40b
import
'package:wakelock_platform_interface/wakelock_platform_interface.dart'
;
/// Stub of the Windows implementation that is required because of https://github.com/creativecreatorormaybenot/wakelock/issues/102.
///
/// This should be removed as soon as https://github.com/flutter/flutter/issues/52267#issuecomment-792302417
/// is available.
class
WakelockWindows
extends
WakelockPlatformInterface
{}
...
...
wakelock/lib/wakelock.dart
View file @
5fde40b
import
'dart:io'
;
import
'package:flutter/foundation.dart'
;
import
'package:wakelock/src/windows_stub.dart'
if
(
dart
.
library
.
io
)
'package:wakelock_windows/wakelock_windows.dart'
;
import
'package:wakelock_macos/wakelock_macos.dart'
;
import
'package:wakelock_platform_interface/wakelock_platform_interface.dart'
;
import
'package:wakelock_windows/wakelock_windows.dart'
;
/// The [WakelockPlatformInterface] that is used by [Wakelock].
///
...
...
@@ -17,6 +18,10 @@ var wakelockPlatformInstance = _defaultPlatformInstance;
/// Workaround for configuring platform instances until https://github.com/flutter/flutter/issues/52267
/// arrives on stable.
///
/// As soon as https://github.com/flutter/flutter/issues/52267#issuecomment-792302417
/// is available, this should be completely removed and both macOS & Windows
/// should use `dartPluginClass` instead.
WakelockPlatformInterface
get
_defaultPlatformInstance
{
// We want to return early on web as the platform checks are unsupported on
// web.
...
...
wakelock/pubspec.yaml
View file @
5fde40b
...
...
@@ -2,7 +2,7 @@ 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.
v
ersion: 0.5.0
v
ersion: 0.5.0
+1
h
omepage: https://github.com/creativecreatorormaybenot/wakelock/tree/master/wakelock
e
nvironment:
...
...
Please
register
or
login
to post a comment