MethodChannelBattery class
An implementation of BatteryPlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- BatteryPlatform
- MethodChannelBattery
Constructors
Properties
- channel → MethodChannel
-
The method channel used to interact with the native platform.
final
- eventChannel → EventChannel
-
The event channel used to interact with the native platform.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
batteryLevel(
) → Future< int> -
Method channel for getting battery level.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onBatteryStateChanged(
) → Stream< BatteryState> -
Event channel for getting battery change state.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited