instance property
WakelockPlatformInterface
instance
The default instance of the WakelockPlatformInterface to use.
Platform-specific plugins should override this with their own platform-specific class that extends WakelockPlatformInterface when they register themselves.
Defaults to MethodChannelWakelock.
Implementation
static WakelockPlatformInterface get instance => _instance;
Sets the default instance of the WakelockPlatformInterface.
This will be removed after https://github.com/flutter/flutter/issues/43368 has been resolved.
Implementation
static set instance(WakelockPlatformInterface instance) {
if (!instance.isMock) {
instance._verifyProvidesDefaultImplementations();
}
_instance = instance;
}