wakelockPlatformInstance top-level property Null safety

WakelockPlatformInterface wakelockPlatformInstance
@visibleForTesting, read / write

The WakelockPlatformInterface that is used by Wakelock.

This needs to be exposed for testing as unit tests might run on macOS. In that case, the "hacky" instance override that we use here would be triggered for the unit tests, even though the unit tests should actually test the pigeon method channel implementation. Therefore, we want to override this in tests that run on macOS (where there is no actual device).


var wakelockPlatformInstance = _defaultPlatformInstance;