Battery class

Battery is the class for battery information.

Constructors

Battery({int? level, String? health, String? status, String? powerSource, String? technology, String? temperature, String? voltage, String? powerProfile})
constructor for the battery class.
Battery.fromJson(String source)
fromJson is the method to convert the json to the class.
factory
Battery.fromMap(Map<String, dynamic> map)
fromMap is the method to convert the map to the class.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
health String?
health is the health of the battery.
getter/setter pair
level int?
level is the level of the battery.
getter/setter pair
powerProfile String?
powerProfile is the power profile of the battery.
getter/setter pair
powerSource String?
powerSource is the power source of the battery.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status String?
status is the status of the battery i.e charging or discharging.
getter/setter pair
technology String?
technology is the technology of the battery i.e Li-ion.
getter/setter pair
temperature String?
temperature is the temperature of the battery in celcius.
getter/setter pair
voltage String?
voltage is the voltage of the battery.
getter/setter pair

Methods

copyWith({int? level, String? health, String? status, String? powerSource, String? technology, String? temperature, String? voltage, String? powerProfile}) Battery
copyWith is the method to copy the class.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
toJson is the method to convert the class to a json.
toMap() Map<String, dynamic>
toMap is the method to convert the class to a map.
toString() String
A string representation of this object.
override

Operators

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