wakelockPlusPlatformInstance top-level property

  1. @visibleForTesting
WakelockPlusPlatformInterface wakelockPlusPlatformInstance
getter/setter pair

The WakelockPlusPlatformInterface that is used by WakelockPlus.

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).

Implementation

@visibleForTesting
var wakelockPlusPlatformInstance = WakelockPlusPlatformInterface.instance;