パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.8.2

wakelock_plus

Android、iOS、macOS、Windows、Linux、Webで画面のスリープを防ぐことで、デバイスの画面を常に点灯状態に保つことができるプラグインです。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
268万
いいね数
649
Pub ポイント
160

パッケージをインストール

flutter pub add wakelock_plus

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

wakelock_plus は、Android、iOS、Web、macOS、Windows、Linux を含む複数のプラットフォームでデバイスの画面をスリープ状態にしないようにする Flutter プラグインです。動画プレーヤー、ナビゲーションアプリ、キオスクモードなど、画面の継続的な表示が必要なアプリケーションに最適です。このパッケージは、wakelock の有効化または無効化を簡単に行える API を提供し、プラットフォームに関係なく一貫した動作を保証します。軽量であり、既存の Flutter プロジェクトへの統合もスムーズです。

用途

  • 動画再生
  • ナビゲーションアプリ
  • キオスクモード
  • デジタルサイネージ
  • インタラクティブなチュートリアル
  • 長時間実行されるプロセス

主な機能

  • クロスプラットフォーム対応
  • シンプルな API
  • バッテリー残量の低下による影響
  • アプリ終了時に自動リリース
  • プラットフォーム固有の最適化
  • ネイティブコードは不要です

適している対象

  • メディアアプリ
  • 販売時点システム
  • 教育ツール
  • プレゼンテーションアプリ
  • 途切れのない表示が必要なアプリケーション

注意事項

  • バッテリー消費量が増加する可能性があります
  • 一部のプラットフォームではユーザーの許可が必要です
  • バックグラウンドタスクには適していません
  • システムの電力管理に影響を与える可能性があります
  • 必要ない場合は無効にするべきです
  • 過剰に使用すると、使いやすさの問題が生じる可能性があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Wakelock Plus

GitHub stars Pub version

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.

Plugin structure

This plugin plugin uses the federated plugins approach.

Android, iOS, macOS (via Hybrid Implementation), and Web use Platform Channels in their implementations. Windows and Linux are handled through Dart-only platform implementations.

The basic API is defined using pigeon. The pigeon files can be found in the pigeons directory in the main package. The API is defined in Dart in the wakelock_plus_platform_interface package.

The packages in this repo are the following:

Package Implementations
wakelock_plus Main plugin package + Android, iOS, macOS, Windows, Linux, and Web implementations
wakelock_plus_platform_interface Basic API definition & message handling

Contributing

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:

WakelockPlus.enable();
//...
WakelockPlus.disable();
//...
WakelockPlus.toggle(enable: true);

カテゴリー

依存関係

依存関係一覧 6 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

ランキング