BatteryStats constructor

const BatteryStats({
  1. double gpsOnTimePercent = 0,
  2. int locationUpdatesCount = 0,
  3. int syncRequestsCount = 0,
  4. double averageAccuracyMeters = 0,
  5. int trackingDurationMinutes = 0,
  6. double? estimatedDrainPercent,
  7. OptimizationLevel optimizationLevel = OptimizationLevel.none,
  8. Map<String, Duration> timeByState = const {},
  9. int? currentBatteryLevel,
  10. bool? isCharging,
  11. int accuracyDowngradeCount = 0,
  12. int gpsDisabledCount = 0,
})

Creates battery statistics.

Implementation

const BatteryStats({
  this.gpsOnTimePercent = 0,
  this.locationUpdatesCount = 0,
  this.syncRequestsCount = 0,
  this.averageAccuracyMeters = 0,
  this.trackingDurationMinutes = 0,
  this.estimatedDrainPercent,
  this.optimizationLevel = OptimizationLevel.none,
  this.timeByState = const {},
  this.currentBatteryLevel,
  this.isCharging,
  this.accuracyDowngradeCount = 0,
  this.gpsDisabledCount = 0,
});