BatteryState constructor

BatteryState({
  1. Header? header,
  2. double? voltage,
  3. double? current,
  4. double? charge,
  5. double? capacity,
  6. double? design_capacity,
  7. double? percentage,
  8. int? power_supply_status,
  9. int? power_supply_health,
  10. int? power_supply_technology,
  11. bool? present,
  12. List<double>? cell_voltage,
  13. String? location,
  14. String? serial_number,
})

Implementation

BatteryState({
  Header? header,
  double? voltage,
  double? current,
  double? charge,
  double? capacity,
  double? design_capacity,
  double? percentage,
  int? power_supply_status,
  int? power_supply_health,
  int? power_supply_technology,
  bool? present,
  List<double>? cell_voltage,
  String? location,
  String? serial_number,
}):
this.header = header ?? Header(),
this.voltage = voltage ?? 0.0,
this.current = current ?? 0.0,
this.charge = charge ?? 0.0,
this.capacity = capacity ?? 0.0,
this.design_capacity = design_capacity ?? 0.0,
this.percentage = percentage ?? 0.0,
this.power_supply_status = power_supply_status ?? 0,
this.power_supply_health = power_supply_health ?? 0,
this.power_supply_technology = power_supply_technology ?? 0,
this.present = present ?? false,
this.cell_voltage = cell_voltage ?? [],
this.location = location ?? '',
this.serial_number = serial_number ?? '';