Skip to content
pubscout

device_display_brightness

0.0.6, released 5 years ago by sominviacheslav.tech

A Flutter plugin to manage the device's display brightness on Android and iOS.

$ flutter pub add device_display_brightness
Source repository

What it does

Allows managing the device's display brightness on Android and iOS. It provides methods to get and set brightness, check if the display is kept on, prevent sleep mode, and reset brightness.

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

Use it when

  • You need to programmatically control display brightness in your app.
  • You want to prevent the device display from going to sleep mode.

Skip it when

  • You do not need to interact with device hardware features like display brightness.

Strengths

  • Supports both Android and iOS.
  • Simple static methods for easy usage.

Weaknesses

  • Requires platform-specific permission setup on Android.

Setup

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

Add WAKE_LOCK permission to AndroidManifest.xml on Android. No setup needed for iOS.

DeviceDisplayBrightness.setBrightness(0.13);
double brightness = await DeviceDisplayBrightness.getBrightness();

Alternatives

Packages that do the same job and could replace device_display_brightness.