Flutter教程

Brightness

Contents

The Brightness plugin let you control the display brightness of your device.

Requires Cordova plugin: cordova-plugin-brightness. For more info, please see the Brightness plugin docs.

https://github.com/mgcrea/cordova-plugin-brightness

联系我们?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic's experts offer official maintenance, support, and integration help.

Contact Us Today!

Ionic 屏幕亮度Brightness插件的安装(Installation)

ionic cordova plugin add cordova-plugin-brightness npm install @ionic-native/brightness
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEY npm install @ionic-enterprise/brightness

Ionic 屏幕亮度Brightness插件支持的平台(Supported Platforms)

  • Android
  • iOS

Ionic 屏幕亮度Brightness插件的用法(Usage)

import { Brightness } from '@ionic-native/brightness/ngx';

constructor(private brightness: Brightness) { }

...

let brightnessValue = 0.8;
this.brightness.setBrightness(brightnessValue);