setSystemBrightness static method
设置系统亮度
Implementation
static Future<void> setSystemBrightness(double value) async {
// 将值限制在 0.0 到 1.0 之间
final double clampedValue = value.clamp(0.0, 1.0);
await methodChannel.invokeMethod("setSystemBrightness", {
"brightness": clampedValue,
});
}