Skip to main content

qr_screen_brightness 0.0.1 copy "qr_screen_brightness: ^0.0.1" to clipboard
qr_screen_brightness: ^0.0.1 copied to clipboard

Flutter plugin for controlling the current iOS screen or Android activity window brightness.

qr_screen_brightness #

Minimal Flutter plugin for controlling screen brightness while showing a QR code.

API #

QrScreenBrightness.isSupported;
await QrScreenBrightness.getBrightness();
await QrScreenBrightness.setBrightness(1.0);
await QrScreenBrightness.setMaxBrightness();
await QrScreenBrightness.resetBrightness();

setBrightness accepts values from 0.0 to 1.0.

Platform behavior #

Android changes only the current activity window brightness. It does not write global system brightness and does not require WRITE_SETTINGS. On reset, Android releases the native window brightness override and lets the system brightness rules take over again.

iOS uses UIScreen.main.brightness. When setting brightness, the plugin remembers both the previous and desired values. resetBrightness restores the previous value only if the current brightness still approximately matches the desired value. This is a best-effort approximation of Android's native override release behavior, while avoiding overwriting manual or external brightness changes.

1
likes
140
points
419
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter plugin for controlling the current iOS screen or Android activity window brightness.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on qr_screen_brightness

Packages that implement qr_screen_brightness