Skip to content
pubscout

flutter_windowmanager

0.2.0, released 5 years ago by adaptant.io

A Flutter plugin for manipulating Android WindowManager LayoutParams dynamically at run-time.

WASM-ready
$ flutter pub add flutter_windowmanager
Source repository

What it does

It allows Flutter apps to dynamically manipulate Android WindowManager LayoutParams at run-time. Developers can add or clear flags like FLAG_SECURE or FLAG_KEEP_SCREEN_ON for specific screens instead of the entire application lifecycle.

AI-written summary of version 0.2.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to disable screenshots for specific screens on Android.
  • You want to dynamically toggle Android window flags like FLAG_KEEP_SCREEN_ON per route.

Skip it when

  • You need cross-platform support for iOS or other platforms.
  • You want declarative window management across multiple non-Android platforms.

Strengths

  • Enables screen-specific security flags (like FLAG_SECURE) on Android.
  • Exposes the full range of Android LayoutParams flags.

Weaknesses

  • Android-only with no iOS support planned or possible.
  • Most flags beyond FLAG_SECURE have not been tested thoroughly with Flutter.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
0

Requires Android platform configuration as it wraps Android-specific WindowManager interfaces.

await FlutterWindowManager.addFlags(FlutterWindowManager.FLAG_SECURE);

Alternatives

Packages that do the same job and could replace flutter_windowmanager.