device_display_brightness 0.0.2 copy "device_display_brightness: ^0.0.2" to clipboard
device_display_brightness: ^0.0.2 copied to clipboard

outdated

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

device_display_brightness #

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

Usage #

For Android, add this permission to AndroidManifest.xml

<uses-permission android:name="android.permission.WAKE_LOCK" />

Example #

// Import package
import 'package:device_display_brightness/device_display_brightness.dart';

// Set the brightness:
DeviceDisplayBrightness.setBrightness(0.13);

// Get the current brightness:
double brightness = await DeviceDisplayBrightness.getBrightness();

// Check if device's display is keeping turned on:
bool isKeptOn = await DeviceDisplayBrightness.isKeptOn();

// Prevent display from going into sleep mode:
DeviceDisplayBrightness.keepOn(isOn: true);
18
likes
0
pub points
88%
popularity

Publisher

verified publishersominviacheslav.tech

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

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on device_display_brightness