Lock Widget is an Android widget locks your screen at the tap of an icon on your home screen, for times when that power button is just slightly more inconvenient to press...
It has no dependencies, resulting in a 12 KB apk.
Supports Android 9 and above, since this requires the Android 9 accessibility framework changes.
Download the apk here: https://github.com/Shingyx/LockWidget/releases