PowerState constructor

const PowerState({
  1. required int batteryLevel,
  2. required bool isCharging,
  3. ChargingType chargingType = ChargingType.none,
  4. bool isPowerSaveMode = false,
  5. bool isDozeMode = false,
  6. bool isBatteryOptimizationExempt = false,
  7. Duration? timeToFullCharge,
  8. Duration? timeRemaining,
})

Creates a power state.

Implementation

const PowerState({
  required this.batteryLevel,
  required this.isCharging,
  this.chargingType = ChargingType.none,
  this.isPowerSaveMode = false,
  this.isDozeMode = false,
  this.isBatteryOptimizationExempt = false,
  this.timeToFullCharge,
  this.timeRemaining,
});