Pakete, Repositories und App-Kategorien suchen

Paketdetailsv1.8.2

wakelock_plus

Plugin, das es Ihnen ermöglicht, den Bildschirm des Geräts wach zu halten, d. h. zu verhindern, dass der Bildschirm auf Android, iOS, macOS, Windows, Linux und Web in den Ruhezustand geht.

AndroidiOSWebmacOSWindowsLinux
30-Tage-Downloads
2,7 Mio.
Likes
649
Pub-Punkte
160

Paket installieren

flutter pub add wakelock_plus

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

wakelock_plus ist ein Flutter-Plugin, das verhindert, dass der Bildschirm des Geräts in den Ruhezustand wechselt und ihn über mehrere Plattformen wie Android, iOS, Web, macOS, Windows und Linux hinweg wach hält. Es ist ideal für Anwendungen, die eine kontinuierliche Bildschirmanzeige erfordern, beispielsweise Videoplayer, Navigations-Apps oder Kiosk-Modi. Das Paket bietet einfache APIs zum Aktivieren oder Deaktivieren des Wake Locks und sorgt für ein konsistentes Verhalten unabhängig von der Plattform. Es ist leichtgewichtig und lässt sich nahtlos in bestehende Flutter-Projekte integrieren.

Anwendungsfälle

  • Videowiedergabe
  • Navigations-Apps
  • Kiosk-Modus
  • Digitale Beschilderung
  • Interaktive Tutorials
  • Langlaufende Prozesse

Hauptmerkmale

  • Plattformübergreifende Unterstützung
  • Einfache API
  • Niedriger Batteriestand Einfluss
  • Automatische Freigabe beim Beenden der App
  • plattformspezifische Optimierungen
  • Kein natives Code erforderlich

Geeignet für

  • Medien-Apps
  • Verkaufspunktsysteme
  • Lernhilfsmittel
  • Präsentationsanwendungen
  • Anwendungen, die eine unterbrechungsfreie Anzeige benötigen

Hinweise

  • Kann den Akkuverbrauch erhöhen
  • Benötigt Benutzerberechtigung auf einigen Plattformen
  • Nicht geeignet für Hintergrundaufgaben
  • Kann die Systemenergieverwaltung beeinträchtigen
  • Sollte deaktiviert werden, wenn nicht erforderlich
  • Mögliche Usability-Probleme bei übermäßiger Verwendung

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

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);

Kategorien

Abhängigkeiten

Abhängigkeiten 6 Einträge

Quell-Repository

Projekte, die dieses Paket verwenden

Ranglisten