flutter_windowmanager_plus 1.1.0
flutter_windowmanager_plus: ^1.1.0 copied to clipboard
A Flutter plugin for manipulating Android WindowManager LayoutParams
1.1.0 #
Added #
FlutterWindowManagerPlus.setSecure(bool)as a single-call way to toggleFLAG_SECURE.- Unit tests covering the platform channel calls for every public method.
Fixed #
- Window flags are now re-applied when Android recreates the Activity (rotation,
multi-window resize, "don't keep activities", locale change). Previously the new
Activity got a fresh
Windowwithout the flags, soFLAG_SECUREwas silently dropped and the app became screenshot-able again (#6). - Flag validation compared
flags & flagagainst1instead of0, so every flag except bit 0 skipped validation entirely and invalid flags were passed straight through toWindow#addFlags. - Deprecated-but-functional flags (
FLAG_SHOW_WHEN_LOCKED,FLAG_TURN_SCREEN_ON,FLAG_DISMISS_KEYGUARD,FLAG_BLUR_BEHIND,FLAG_DITHER,FLAG_TOUCHABLE_WHEN_WAKING) are no longer rejected on modern API levels. - The native
setSecurehandler was unreachable: it required aflagsargument that the call never carries, so it always failed withINVALID_ARGUMENT. addFlags/clearFlagsno longer throw a type error when the platform returnsnull; they reportfalseinstead.
Changed #
- Platform detection uses
defaultTargetPlatforminstead ofPlatform.isAndroid, so consumers can override the platform in their own unit tests and still assert that the plugin's methods are called (#5). - Published
compileSdk 36(with AGP 8.13.0 / Kotlin 2.1.20), resolving theandroidx.window:window:1.2.0 requires compileSdk 34+build failure. This landed onmainin 1.0.1 but was never released to pub.dev (#8).
1.0.1 #
Changed #
- Specified the
namespacein the module'sbuild.gradlefor AGP 8 compatibility. - Guarded the platform channel calls behind an Android platform check.
1.0.0 #
Added #
- Initial release of
flutter_windowmanager_plus. - Forked from the original
flutter_windowmanagerpackage. - Implemented basic functionality for adding and clearing window flags.
- Support for all Android window flags from WindowManager.LayoutParams.
- Added documentation and example usage in README.md.
Changed #
- Updated package to support newer version of android and flutter.
- Modernized plugin structure to use the latest Flutter plugin APIs.
Fixed #
- Resolved issues with deprecated method usage from the original package.
- Improved error handling and API level checking for flag compatibility.