instance property
BatteryPlatform
instance
The default instance of BatteryPlatform to use.
Defaults to MethodChannelBattery.
Implementation
static BatteryPlatform get instance => _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;
}