MethodChannelBattery class

An implementation of BatteryPlatform that uses method channels.

Inheritance

Constructors

MethodChannelBattery()

Properties

batteryLevel Future<int>
Returns the current battery level in percent.
no setteroverride
batteryState Future<BatteryState>
Returns the current battery state in percent.
no setteroverride
eventChannel EventChannel
The event channel used to receive BatteryState changes from the native platform.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isInBatterySaveMode Future<bool>
Returns true if the device is on battery save mode
no setteroverride
methodChannel MethodChannel
The method channel used to interact with the native platform.
getter/setter pair
onBatteryStateChanged Stream<BatteryState>
Fires whenever the battery state changes.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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