# 屏幕

# Api域:

const native = kreator.native;

# native.changeScreenBright(options)

修改屏幕亮度。

参数名 类型 描述
options ScreenBrightInterface 调用入参

# ScreenBrightInterface类型:

参数名 类型 描述
brightness number 屏幕亮度值,为0-1之间的小数,不能超过1

# 返回值

void 无

native.changeScreenBright({
    brightness: 0.1,
}).then((res) => {
    console.log(res);
});

# native.getHasNotch()

判断当前设备是否刘海屏。
该方法为同步方法。

# 返回值

boolean 设备是否为刘海屏

const result = native.getHasNotch()