instance property

BatteryPlatform instance

The default instance of BatteryPlatform to use.

Defaults to MethodChannelBattery.

Implementation

static BatteryPlatform get instance => _instance;
void instance=(BatteryPlatform instance)

Platform-specific plugins should set this with their own platform-specific class that extends BatteryPlatform when they register themselves.

Implementation

static set instance(BatteryPlatform instance) {
  PlatformInterface.verifyToken(instance, _token);
  _instance = instance;
}