A Flutter plugin to control brightness of the device's screen on Android and iOS.
To use this plugin, add brightness as a dependency in your pubspec.yaml file.
// 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);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.