BatteryPlusPlugin class

The web implementation of the BatteryPlatform of the Battery plugin.

  • Object
  • PlatformInterface
  • BatteryPlatform
  • BatteryPlusPlugin


BatteryPlusPlugin(Navigator navigator)
Constructs a BatteryPlusPlugin.


batteryLevel Future<int>
Returns the current battery level in percent.
no setteroverride
batteryState Future<BatteryState>
Returns the current battery state.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
isInBatterySaveMode Future<bool>
Returns true if the device is on battery save mode
no setterinherited
isSupported bool
A check to determine if this version of the plugin can be used.
no setter
onBatteryStateChanged Stream<BatteryState>
Returns a Stream of BatteryState changes.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.

Static Methods

registerWith(Registrar registrar) → void
Factory method that initializes the Battery plugin platform with an instance of the plugin for the web.