用户可借助此项目实现在 OpenHarmony 应用中控制屏幕常亮功能。它是 wakelock_plus 插件的原生 OHOS 实现,采用联邦插件架构,支持启用、禁用、切换屏幕常亮及查询状态。【此简介由AI生成】
Access rate limit exceeded. Please log in to continue.
wakelock_plus_ohos
OHOS platform implementation of wakelock_plus.
This package provides the native OHOS (OpenHarmony) implementation for the
wakelock_plus plugin via the federated plugin architecture.
Usage
Add the following to your pubspec.yaml:
dependencies:
wakelock_plus: ^1.4.0
wakelock_plus_ohos: ^1.0.0
Then use the wakelock_plus API as normal:
import 'package:wakelock_plus/wakelock_plus.dart';
// Enable the wakelock
WakelockPlus.enable();
// Disable the wakelock
WakelockPlus.disable();
// Toggle the wakelock
WakelockPlus.toggle(enable: true);
// Check if the wakelock is enabled
bool enabled = await WakelockPlus.enabled;
License
BSD 3-Clause License
Introduction
用户可借助此项目实现在 OpenHarmony 应用中控制屏幕常亮功能。它是 wakelock_plus 插件的原生 OHOS 实现,采用联邦插件架构,支持启用、禁用、切换屏幕常亮及查询状态。【此简介由AI生成】
Customize your domain