Every example of calling enable or disable should be awaited.
Whilst technically you don't need to await them it's considered best practice to await or explicitly unawait any async calls.
The examples should also show a try block around any enable/disable calls to ensure that the disable method is called even if an exception is thrown.
await WakelockPlus.enable();
try {
/// do something and an exception might be thrown
}
finally {
/// ensure the wake lock is relased.
await WakelockPlus.disable();
}
Thanks for the package.
Just some feedback on the doco.
Every example of calling enable or disable should be awaited. Whilst technically you don't need to await them it's considered best practice to await or explicitly unawait any async calls.
The examples should also show a try block around any enable/disable calls to ensure that the disable method is called even if an exception is thrown.