BatteryServiceImpl class
Implementation of BatteryService using method channel.
- Implemented types
Constructors
- BatteryServiceImpl(LocusInterface _instanceProvider())
- Creates a battery service with the given Locus interface provider.
Properties
- adaptiveTrackingConfig → AdaptiveTrackingConfig?
-
Gets the current adaptive tracking configuration.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
powerSaveChanges
→ Stream<
bool> -
Stream of power save mode changes.
no setteroverride
-
powerStateEvents
→ Stream<
PowerStateChangeEvent> -
Stream of power state changes.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
calculateAdaptiveSettings(
) → Future< AdaptiveSettings> -
Calculates optimal settings based on current conditions.
override
-
estimateRunway(
) → Future< BatteryRunway> -
Estimates remaining battery runway for location tracking.
override
-
getPowerState(
) → Future< PowerState> -
Gets current power state.
override
-
getStats(
) → Future< BatteryStats> -
Gets current battery statistics.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onPowerSaveChange(
void callback(bool), {Function? onError}) → StreamSubscription< bool> -
Subscribes to power save mode changes.
override
-
onPowerStateChange(
void callback(PowerStateChangeEvent event), {Function? onError}) → StreamSubscription< PowerStateChangeEvent> -
Subscribes to power state change events.
override
-
recordBenchmarkLocationUpdate(
{double? accuracy}) → void -
Records a location update for benchmarking.
override
-
recordBenchmarkSync(
) → void -
Records a sync event for benchmarking.
override
-
setAdaptiveTracking(
AdaptiveTrackingConfig config) → Future< void> -
Sets adaptive tracking configuration.
override
-
startBenchmark(
) → Future< void> -
Starts a battery benchmark test.
override
-
stopBenchmark(
) → Future< BenchmarkResult?> -
Stops the battery benchmark and returns results.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited