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
顾海波
2025-10-10 17:02:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6ca0a003c4fe86a0433cca8d4fd06442f46886b0
6ca0a003
1 parent
4f3b6f01
【需求】移除win
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
wakelock/lib/wakelock.dart
wakelock/lib/wakelock.dart
View file @
6ca0a00
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/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'
;
...
...
@@ -36,12 +36,12 @@ WakelockPlatformInterface get _defaultPlatformInstance {
return
WakelockMacOS
();
}
if
(
Platform
.
isWindows
)
{
// 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.
return
WakelockWindows
();
}
// if (Platform.isWindows) {
// // 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.
// return WakelockWindows();
// }
return
WakelockPlatformInterface
.
instance
;
}
...
...
Please
register
or
login
to post a comment