system_screen_brightness 0.0.4 copy "system_screen_brightness: ^0.0.4" to clipboard
system_screen_brightness: ^0.0.4 copied to clipboard

A Plugin for controlling system screen brightness.

system_screen_brightness #

A Plugin for controlling screen brightness.

Getting Started #

Install #

Add the following lines in your pubspec.yaml file

  system_screen_brightness: ^latest_version

API #

System current brightness

Future<double> get currentbrightnes async {
  try {
    return await SystemScreenBrightness().currentBrightness;
  } catch (e) {
    print(e);
    throw 'Failed to get system current brightness brightness';
  }
}

Set brightness

Future<void> setSystemScreenBrightness(double brightness) async {
  try {
    await SystemScreenBrightness.setSystemScreenBrightness(brightness);
  } catch (e) {
    print(e);
    throw 'Failed to set system screen brightness';
  }
}
1
likes
130
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

A Plugin for controlling system screen brightness.

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on system_screen_brightness

Packages that implement system_screen_brightness