is_lock_screen2
Detects if device is in lock screen. Useful for determining whether app entered background due to locking screen or leaving app.
2.1.0
4.0K downloads/mo
#4198 most downloaded on pub.dev
Wing-Li/flutter_is_lock_screen2
What this package is like to depend on
Last release 1 months ago
30 Jun 2026
Release timing varies
gaps range from 2 weeks to 1.6 years
Nearly every release is documented
notes for 6 of 6 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
6 releases · first in 2023
3 releases in the last 12 months
see the full history below
Release timeline
6 releases · Jul 2023 to Jun 2026
2024
2025
2026
Releases
latest 6-
2.1.030 Jun 2026Release notes
Open source →- Added
isLockScreenOrThrow()andIsLockScreenExceptionso callers can distinguish missing plugin registration, platform errors, and unexpectednullplatform responses. - Kept
isLockScreen()compatible with previous releases by returningnullfor all failure modes. - Added Swift Package Manager (SPM) support for iOS (Flutter 3.44+ default build system).
- Updated podspec iOS minimum to 12.0 (required by SPM).
- Updated Android Gradle Plugin to 8.6.1 and Gradle wrappers to 8.7 so the Android build chain officially supports API 35.
- Replaced deprecated Android Gradle DSL entries and removed obsolete
android.enableR8properties. - Increased the Gradle heap size used by the plugin and example Android builds to avoid Jetifier transform out-of-memory failures.
- Added
-
2.0.512 Jun 2026Release notes
Open source →- Improved the iOS lock-screen heuristic by combining protected data availability, protected data notifications, and screen brightness.
- Added Dart MethodChannel tests for
true,false,null, platform exceptions, and missing plugin registration. - Cleaned up analyzer hints in the example app and adjusted
.gitignorefor release packaging. - Documented that iOS does not provide a stable public lock-screen state API, so iOS detection remains heuristic and should not be treated as a security source of truth.
-
2.0.417 Sep 2025Release notes
Open source →- Updated the .gitignore file, added Android build-related directories, and the pubspec.lock file.
- Updated compileSdkVersion from 34 to 35, Java version from 1.8 to 11, and Kotlin version from jdk7 to jdk8 in build.gradle.
- Updated example/android/build.gradle to remove jcenter() and update Kotlin version to 2.1.0.
- Added pluginManagement to settings.gradle to configure the Flutter SDK path.
- Added plugin declarations to app/build.gradle and updated compileSdkVersion and targetSdkVersion to 35.
- Updated dependency versions in pubspec.lock to ensure compatibility with the latest Dart and Flutter SDKs.
- Deleted the MainActivity.kt file to simplify the project structure.
-
2.0.308 Apr 2025Release notes
Open source →- removing name space from AndroidManifest.xml and moving it to build.gradle
- upgrading gradle version to 8.4
- removing the registerWith, it's no longer needed in the new FlutterPlugin
-
2.0.224 Feb 2025 -
2.0.123 Jul 2023