BatteryState class

Represents the battery state, including level, temperature, and charging status.

Constructors

BatteryState({required int level, required int temperature, required bool isCharging})
Constructs a BatteryState object with the given properties.
BatteryState.fromMap(Map<String, dynamic> map)
Creates a BatteryState from a map, typically received from platform code.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isCharging bool
Indicates whether the device is charging.
final
level int
The battery level as a percentage.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
temperature int
The battery temperature in tenths of a degree Celsius.
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