Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
135cea3
Upgraded pigeons to latest v26 version. Flutter minimum supported
diegotori Mar 11, 2026
018f5d9
Updated Github Action workflows to better test this library under mul…
diegotori Mar 11, 2026
ddbb963
Fixed broken tests.
diegotori Mar 11, 2026
d9112dc
Added N-1 Flutter version testing to checks.
diegotori Mar 11, 2026
f312575
Fixed failing workflow jobs.
diegotori Mar 11, 2026
c134f03
Fixed Linux integration test workflow job.
diegotori Mar 11, 2026
de373e5
Fixed workflow formatting.
diegotori Mar 11, 2026
049a107
Fixed yet another workflow issue.
diegotori Mar 11, 2026
65c209d
Workflow now juggles between the minimum Flutter version this package…
diegotori Mar 11, 2026
5048112
Straggler from previous commit.
diegotori Mar 11, 2026
7aa5ebc
Second attempt at supporting different versions and channels.
diegotori Mar 11, 2026
082ee54
Third attempt at supporting different versions and channels.
diegotori Mar 11, 2026
71fe266
Fourth attempt at supporting different versions and channels.
diegotori Mar 11, 2026
cc3dcf1
Example app is now set to the minimum supported Flutter version.
diegotori Mar 11, 2026
43ae270
Format workflow jobs should continue on error when running it on the …
diegotori Mar 11, 2026
2251a16
Format workflow jobs should also continue on error when running it on…
diegotori Mar 12, 2026
f4197c3
Nit from previous commit.
diegotori Mar 12, 2026
fc36743
Another nit from previous commit.
diegotori Mar 12, 2026
3863133
Fixed formatting.
diegotori Mar 12, 2026
4d0eeb5
Added a mock background D-Bus service for Linux integration tests.
diegotori Mar 12, 2026
3ba872c
Scoped flutter analyze to just the lib and test directories.
diegotori Mar 12, 2026
d571063
Straggler from previous commit, again.
diegotori Mar 12, 2026
f24706c
More workflow cleanup, again.
diegotori Mar 12, 2026
2e89803
More workflow cleanup, yet again.
diegotori Mar 12, 2026
e436ad2
Attempt at not hanging the web integration tests.
diegotori Mar 12, 2026
19e9a1d
Second attempt at not hanging the web integration tests.
diegotori Mar 12, 2026
d621499
Third attempt at not hanging the web integration tests.
diegotori Mar 12, 2026
63c763d
Fourth attempt at not hanging the web integration tests.
diegotori Mar 12, 2026
5e17f2f
Fifth attempt at not hanging the web integration tests.
diegotori Mar 12, 2026
bf6bdf2
Sixth attempt at not hanging the web integration tests.
diegotori Mar 12, 2026
8b42048
Upgraded the example web app's page as per the current standard.
diegotori Mar 12, 2026
c0fec87
Upgraded macos and iOS configurations in the example app.
diegotori Mar 12, 2026
8b5d060
Attempt and reducing flakiness in the iOS Integration Tests.
diegotori Mar 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
535 changes: 467 additions & 68 deletions .github/workflows/checks.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/pana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: axel-op/dart-package-analyzer@v3
with:
relativePath: ${{ matrix.package }}
Expand Down
1 change: 1 addition & 0 deletions wakelock_plus/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ pubspec.lock
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*
**/.build/

# Exceptions to above rules.
!**/ios/**/default.mode1v3
Expand Down
1 change: 1 addition & 0 deletions wakelock_plus/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ analyzer:
- ".git/**" # Exclude private git directory
- "build/**" # Exclude generated files in the build directory
- ".dart_tool/**" # Exclude Dart tool-generated files
- "pigeons/**" # Exclude pigeons

linter:
rules:
Expand Down
2 changes: 1 addition & 1 deletion wakelock_plus/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ android {

defaultConfig {
// Use flutter.minSdkVersion once the minimum supported Flutter version is 3.35 or higher.
minSdkVersion 21
minSdkVersion flutter.minSdkVersion
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.0.1), do not edit directly.
// Autogenerated from Pigeon (v26.2.3), do not edit directly.
// See also: https://pub.dev/packages/pigeon
@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass")

Expand Down Expand Up @@ -56,7 +56,7 @@ private object WakelockPlusMessagesPigeonUtils {
}
if (a is Map<*, *> && b is Map<*, *>) {
return a.size == b.size && a.all {
(b as Map<Any?, Any?>).containsKey(it.key) &&
(b as Map<Any?, Any?>).contains(it.key) &&
deepEquals(it.value, b[it.key])
}
}
Expand Down
2 changes: 0 additions & 2 deletions wakelock_plus/example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,5 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>12.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion wakelock_plus/example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '12.0'
platform :ios, '13.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
4 changes: 2 additions & 2 deletions wakelock_plus/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/wakelock_plus/ios"

SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556

PODFILE CHECKSUM: beab77b38961de946f08660e554f80ac174dc842
PODFILE CHECKSUM: a5dd15803c05a42a9ae1068254e24631f03bf853

COCOAPODS: 1.16.2
6 changes: 3 additions & 3 deletions wakelock_plus/example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -580,7 +580,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -629,7 +629,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
Expand Down Expand Up @@ -54,6 +55,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
2 changes: 1 addition & 1 deletion wakelock_plus/example/ios/Runner/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import <Flutter/Flutter.h>
#import <UIKit/UIKit.h>

@interface AppDelegate : FlutterAppDelegate
@interface AppDelegate : FlutterAppDelegate <FlutterImplicitEngineDelegate>

@end
5 changes: 4 additions & 1 deletion wakelock_plus/example/ios/Runner/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ @implementation AppDelegate

- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

- (void)didInitializeImplicitFlutterEngine:(NSObject<FlutterImplicitEngineBridge>*)engineBridge {
[GeneratedPluginRegistrant registerWithRegistry:engineBridge.pluginRegistry];
}

@end
29 changes: 25 additions & 4 deletions wakelock_plus/example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
Expand All @@ -24,6 +26,29 @@
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>flutter</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand All @@ -41,9 +66,5 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
22 changes: 8 additions & 14 deletions wakelock_plus/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,12 @@ class _WakelockPlusExampleAppState extends State<WakelockPlusExampleApp> {
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Wakelock example app'),
),
appBar: AppBar(title: const Text('Wakelock example app')),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
const Spacer(
flex: 3,
),
const Spacer(flex: 3),
OutlinedButton(
onPressed: () {
// The following code will enable the wakelock on the device
Expand All @@ -56,9 +52,7 @@ class _WakelockPlusExampleAppState extends State<WakelockPlusExampleApp> {
},
child: const Text('disable wakelock'),
),
const Spacer(
flex: 2,
),
const Spacer(flex: 2),
FutureBuilder(
future: WakelockPlus.enabled,
builder: (context, AsyncSnapshot<bool> snapshot) {
Expand All @@ -71,13 +65,13 @@ class _WakelockPlusExampleAppState extends State<WakelockPlusExampleApp> {
return Container();
}

return Text('The wakelock is currently '
'${data ? 'enabled' : 'disabled'}.');
return Text(
'The wakelock is currently '
'${data ? 'enabled' : 'disabled'}.',
);
},
),
const Spacer(
flex: 3,
),
const Spacer(flex: 3),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion wakelock_plus/example/macos/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :osx, '10.14'
platform :osx, '10.15'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
10 changes: 5 additions & 5 deletions wakelock_plus/example/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos

SPEC CHECKSUMS:
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c
wakelock_plus: 4783562c9a43d209c458cb9b30692134af456269
FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1
package_info_plus: f0052d280d17aa382b932f399edf32507174e870
wakelock_plus: 917609be14d812ddd9e9528876538b2263aaa03b

PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
PODFILE CHECKSUM: 9ebaf0ce3d369aaa26a9ea0e159195ed94724cf3

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
10 changes: 5 additions & 5 deletions wakelock_plus/example/macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@
40C6B7F8860B1BE2A6B07ADA /* Pods-RunnerTests.release.xcconfig */,
AF138727C3933020F89B6B28 /* Pods-RunnerTests.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
Expand Down Expand Up @@ -342,6 +341,7 @@
};
33CC111E2044C6BF0003C045 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand All @@ -358,7 +358,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire\n";
};
4AE49CEDD56F01D3AA086266 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -553,7 +553,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down Expand Up @@ -632,7 +632,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -679,7 +679,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
4 changes: 4 additions & 0 deletions wakelock_plus/example/macos/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}

override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
}
8 changes: 4 additions & 4 deletions wakelock_plus/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description: Demonstrates how to use the wakelock_plus plugin.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

environment:
sdk: '>=3.3.0 <4.0.0'
flutter: ">=3.19.0"
sdk: '>=3.10.0 <4.0.0'
flutter: ">=3.38.0"

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
Expand All @@ -28,7 +28,7 @@ dependencies:

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.5
cupertino_icons: ^1.0.8

dev_dependencies:
flutter_test:
Expand All @@ -43,7 +43,7 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^2.0.1
flutter_lints: ^6.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
31 changes: 8 additions & 23 deletions wakelock_plus/example/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,14 @@

<title>example</title>
<link rel="manifest" href="manifest.json">

<script>
// The value below is injected by flutter build, do not touch.
var serviceWorkerVersion = null;
</script>
<!-- This script adds the flutter initialization JS code -->
<script src="flutter.js" defer></script>
</head>
<body>
<script>
window.addEventListener('load', function(ev) {
// Download main.dart.js
_flutter.loader.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
},
onEntrypointLoaded: function(engineInitializer) {
engineInitializer.initializeEngine().then(function(appRunner) {
appRunner.runApp();
});
}
});
});
</script>
<!--
The flutter_bootstrap.js script is generated by the Flutter tool during build.
It automatically handles the service worker versioning and engine initialization,
removing the need for the manual 'loadEntrypoint' logic and fixing the
deprecation warnings.
-->
<script src="flutter_bootstrap.js" async></script>
</body>
</html>
</html>
Loading
Loading