wakelock_plus는 Android, iOS, 웹, macOS, Windows, Linux 등 여러 플랫폼에서 기기 화면이 절전 모드로 전환되지 않도록 하는 Flutter 플러그인입니다. 비디오 플레이어, 내비게이션 앱 또는 키오스크 모드와 같이 화면을 지속적으로 표시해야 하는 애플리케이션에 적합합니다. 이 패키지는 wakelock를 활성화하거나 비활성화할 수 있는 간단한 API를 제공하여 플랫폼에 관계없이 일관된 동작을 보장합니다. 가볍고 기존의 Flutter 프로젝트에 쉽게 통합할 수 있습니다.
사용 사례
비디오 재생
내비게이션 앱
키오스크 모드
디지털 사인
인터랙티브 튜토리얼
장시간 실행되는 프로세스
주요 기능
크로스 플랫폼 지원
간단한 API
저전력 영향
앱 종료 시 자동 릴리스
플랫폼별 최적화
네이티브 코드가 필요하지 않습니다
적합한 대상
미디어 앱
포인트 오브 세일 시스템
교육 도구
프레젠테이션 앱
끊김 없이 표시가 필요한 애플리케이션
고려 사항
배터리 사용량이 증가할 수 있습니다
일부 플랫폼에서는 사용자 권한이 필요합니다
백그라운드 작업에 적합하지 않습니다
시스템 전력 관리에 간섭할 수 있습니다
필요하지 않을 때 비활성화되어야 합니다
과도하게 사용할 경우 사용성 문제 발생 가능
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Wakelock Plus
A continuation of the original Flutter plugin
that allows you to keep the device screen awake, i.e. prevent the screen
from sleeping.
Supported platforms
Platform
wakelock_plus support
Android
✅
iOS
✅
Web
✅
macOS
✅
Windows
✅
Linux
✅
Getting started
To learn more about the plugin and getting started, you can view the main package's
README.
Android, iOS, macOS (via Hybrid Implementation), and Web use Platform Channels in their implementations.
Windows and Linux are handled through Dart-only platform implementations.
If you want to contribute to this plugin, follow the contributing guide.
Origin
As stated before, this plugin is a continuation of the original wakelock plugin.
That plugin was originally based on screen.
Specifically, the wakelock functionality was extracted into the wakelock plugin due to lack of
maintenance by the author of the screen plugin.
For this library, the functionality remains the
same as the original plugin, but has been completely refreshed (using latest Flutter standards and
platform integration) with support for all six platforms currently supported by Flutter
(Android, iOS, macOS, Windows, Linux, and Web).
Migrating from the wakelock Plugin
Simply replace the import statement with the one below:
import'package:wakelock_plus/wakelock_plus.dart';
As well as replacing all the calls to Wakelock with WakelockPlus: