Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Commit

Permalink
Add supported platforms (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
creativecreatorormaybenot committed Jan 12, 2021
1 parent aab86db commit d6f675e
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 9 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Wakelock [![GitHub stars](https://img.shields.io/github/stars/creativecreatorormaybenot/wakelock.svg)](https://github.com/creativecreatorormaybenot/wakelock) [![Pub version](https://img.shields.io/pub/v/wakelock.svg)](https://pub.dev/packages/wakelock) [![Twitter Follow](https://img.shields.io/twitter/follow/creativemaybeno?label=Follow&style=social)](https://twitter.com/creativemaybeno)

Wakelock is Flutter plugin that allows you to keep the device screen awake, i.e. prevent the screen from sleeping on Android, iOS, and web.
Wakelock is Flutter plugin that allows you to keep the device screen awake, i.e. prevent the screen from sleeping.

## Supported platforms

| Platform | `wakelock` support |
| :------- | :----------------: |
| Android ||
| iOS ||
| Web ||
| macOS | ⚒ work in progress |
| Windows | ❎ planned |
| Linux | ❎ planned |

## Getting started

Expand Down
4 changes: 4 additions & 0 deletions wakelock/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.0-nullsafety.3

* Add supported platforms to README.

## 0.3.0-nullsafety.2

* Indicated that no permissions are required for using the `wakelock` plugin in the README.
Expand Down
23 changes: 16 additions & 7 deletions wakelock/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
# wakelock [![Pub version](https://img.shields.io/pub/v/wakelock.svg)](https://pub.dev/packages/wakelock) [![GitHub stars](https://img.shields.io/github/stars/creativecreatorormaybenot/wakelock.svg)](https://github.com/creativecreatorormaybenot/wakelock) [![Twitter Follow](https://img.shields.io/twitter/follow/creativemaybeno?label=Follow&style=social)](https://twitter.com/creativemaybeno)

Plugin that allows you to keep the device screen awake, i.e. prevent the screen from sleeping on
Android, iOS, and web.
Plugin that allows you to keep the device screen awake, i.e. prevent the screen from sleeping

---

The plugin allows you to enable and toggle the screen wakelock on Android, iOS, and web, which
prevents the screen from turning off automatically.
The plugin allows you to enable and toggle the screen wakelock, which prevents the screen from turning off automatically.
Essentially, this allows you to keep the device awake, i.e. prevent the device from sleeping.

## Supported platforms

| Platform | `wakelock` support |
| :------- | :----------------: |
| Android ||
| iOS ||
| Web ||
| macOS | ⚒ work in progress |
| Windows | ❎ planned |
| Linux | ❎ planned |

## Usage

To use this plugin, follow the [installing guide](https://pub.dev/packages/wakelock/install).

The `wakelock` plugin **does not require any special *permissions*** on any platform :)
This is because it only enables the *screen wakelock* and not any partial (CPU) wakelocks that would keep the app alive in the background.
The `wakelock` plugin **does not require any special _permissions_** on any platform :)
This is because it only enables the _screen wakelock_ and not any partial (CPU) wakelocks that would keep the app alive in the background.

### Implementation

Everything in this plugin is controlled via the [`Wakelock` class](https://pub.dev/documentation/wakelock/latest/wakelock/Wakelock-class.html).
If you want to enable the wakelock, i.e. keep the device awake, you can simply call [`Wakelock.enable`](https://pub.dev/documentation/wakelock/latest/wakelock/Wakelock/enable.html)
If you want to enable the wakelock, i.e. keep the device awake, you can simply call [`Wakelock.enable`](https://pub.dev/documentation/wakelock/latest/wakelock/Wakelock/enable.html)
and to disable it again, you can use [`Wakelock.disable`](https://pub.dev/documentation/wakelock/latest/wakelock/Wakelock/disable.html):

```dart
Expand Down
2 changes: 1 addition & 1 deletion wakelock/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: wakelock
description: >-2
Plugin that allows you to keep the device screen awake, i.e. prevent the screen from sleeping on
Android, iOS, and web.
version: 0.3.0-nullsafety.2
version: 0.3.0-nullsafety.3
homepage: https://github.com/creativecreatorormaybenot/wakelock/tree/master/wakelock

environment:
Expand Down

0 comments on commit d6f675e

Please sign in to comment.