stopBatteryBenchmark method
override
Implementation
@override
Future<BenchmarkResult?> stopBatteryBenchmark() async {
_methodCalls.add('stopBatteryBenchmark');
if (_activeBenchmark == null || !_activeBenchmark!.isRunning) {
return null;
}
final result = _activeBenchmark!.finish(
currentBattery: _powerState.batteryLevel,
);
_activeBenchmark = null;
return result;
}