registerWith static method
Registers WakelockWeb as the default instance of the
WakelockPlatformInterface
.
Implementation
static void registerWith(Registrar registrar) {
// Import a version of `NoSleep.js` that was adjusted for the wakelock
// plugin.
importJsLibrary(
url: 'assets/no_sleep.js', flutterPluginName: 'wakelock_web');
WakelockPlatformInterface.instance = WakelockWeb();
}