creativecreatorormaybenot

Improved README's

... ... @@ -4,7 +4,8 @@ This plugin allows you to enable and toggle the Android and iOS screen wakelock,
## Getting Started
If you want to enable the wakelock, you can simply call `Wakelock.enableWakelock` and to disable it, you can use `Wakelock.disableWakelock`:
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, you can simply call [`Wakelock.enableWakelock`](https://pub.dev/documentation/wakelock/latest/wakelock/Wakelock/enableWakelock.html) and to disable it, you can use [`Wakelock.disableWakelock`](https://pub.dev/documentation/wakelock/latest/wakelock/Wakelock/disableWakelock.html):
```dart
import 'package:wakelock/wakelock.dart';
... ... @@ -17,7 +18,7 @@ Wakelock.enableWakelock();
Wakelock.disableWakelock();
```
For more advanced usage, you can pass a `bool` to `Wakelock.toggleWakelock` to enable or disable the wakelock and also retrieve the current wakelock status using `Wakelock.isWakelockEnabled`:
For more advanced usage, you can pass a `bool` to [`Wakelock.toggleWakelock`](https://pub.dev/documentation/wakelock/latest/wakelock/Wakelock/toggleWakelock.html) to enable or disable the wakelock and also retrieve the current wakelock status using [`Wakelock.isWakelockEnabled`](https://pub.dev/documentation/wakelock/latest/wakelock/Wakelock/isWakelockEnabled.html):
```dart
import 'package:wakelock/wakelock.dart';
... ... @@ -34,4 +35,9 @@ Wakelock.toggleWakelock(enableWakelock); // This statement disables the wakelock
bool isWakelockEnabled = await Wakelock.isWakelockEnabled;
```
If you want to wait for the wakelock toggle on Android or iOS to complete (which takes an insignificant amount of time), you can also await either of `Wakelock.enableWakelock`, `Wakelock.disableWakelock`, and `Wakelock.toggleWakelock`.
\ No newline at end of file
If you want to wait for the wakelock toggle on Android or iOS to complete (which takes an insignificant amount of time), you can also await either of `Wakelock.enableWakelock`, `Wakelock.disableWakelock`, and `Wakelock.toggleWakelock`.
## Note
This plugin is originally based on [`flutter_screen`](https://pub.dev/packages/screen).
Specifically, the wakelock functionality was extracted into this plugin due to a lack of maintenance.
\ No newline at end of file
... ...
# Example
This is a basic example demonstrating the functionality of the wakelock plugin, including enabling & disabling the wakelock and also retrieving the current wakelock status using a `FutureBuilder`.
\ No newline at end of file
This is a basic example demonstrating the functionality of the wakelock plugin, including enabling & disabling the wakelock and also retrieving the current wakelock status using a `FutureBuilder`.
See [`example/lib/main.dart`](https://github.com/creativecreatorormaybenot/wakelock/blob/master/example/lib/main.dart).
\ No newline at end of file
... ...