battery property

Battery battery
getter/setter pair

Device battery-level when this Location was recorded.

See Battery

BackgroundGeolocation.onLocation((Location location) {
  bool isCharging = location.battery.isCharging;
  double level    = location.battery.level;

  print("[onLocation] Battery state, isCharging: $isCharging, level: $level");
});

Implementation

late Battery battery;