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.
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.
- display_metrics
Retrieve physical display size, resolution, and PPI, and convert inches and mm to logical pixels.
78Compare - contacts_service_plus
Retrieve and manage device contacts on Android and iOS devices.
64Compare - flutter_screen_wake
Manage device screen wake state and brightness on Android and iOS.
40Compare - flutter_displaymode
Set display mode, resolution, and refresh rate on Android platform.
55Compare