/brightness

A Flutter plugin to control brightness of the device's screen on Android and iOS.

Primary LanguageJavaBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Brightness

A Flutter plugin to control brightness of the device's screen on Android and iOS.

Usage

To use this plugin, add brightness as a dependency in your pubspec.yaml file.

Example

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

// Get the current brightness:
double brightness = await Screen.brightness;

// Set the brightness:
Screen.setBrightness(0.5);

// Reset the brightness to system value (controlled by user):
Screen.setBrightness(-1);

Origin

Originally, this plugin was based on screen.
Specifically, the brightness functionality was extracted into this plugin due to lack of maintenance by the author of the screen plugin.

Today, the brightness plugin has been completely refreshed.