BatteryEvent class final

Event emitted when battery state changes.

Inheritance

Constructors

BatteryEvent({required int level, required bool charging, required BatteryState state})
Creates a battery event.
const

Properties

charging bool
Whether the device is charging or full.
final
hashCode int
The hash code for this object.
no setterinherited
level int
Battery level from 0 to 100, or -1 when unavailable.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state BatteryState
Current battery state.
final

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