From 58687eb99cc5815cf4cc3030c6d6e8e5ef04f426 Mon Sep 17 00:00:00 2001 From: bardram Date: Sat, 30 Mar 2024 13:07:48 +0100 Subject: [PATCH] health - code formatting --- .../kotlin/cachet/plugins/health/HealthPlugin.kt | 8 +++----- packages/health/lib/src/health_plugin.dart | 16 ++++++++++------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/packages/health/android/src/main/kotlin/cachet/plugins/health/HealthPlugin.kt b/packages/health/android/src/main/kotlin/cachet/plugins/health/HealthPlugin.kt index 63323ba88..7d156be57 100644 --- a/packages/health/android/src/main/kotlin/cachet/plugins/health/HealthPlugin.kt +++ b/packages/health/android/src/main/kotlin/cachet/plugins/health/HealthPlugin.kt @@ -1576,8 +1576,7 @@ class HealthPlugin(private var channel: MethodChannel? = null) : // / Fetch all data points for the specified DataType val dataSet = response.getDataSet(dataType) /// For each data point, extract the contents and send them to Flutter, along with - // date and - // unit. + // date and unit. var dataPoints = dataSet.dataPoints if (!includeManualEntry) { dataPoints = @@ -1587,9 +1586,8 @@ class HealthPlugin(private var channel: MethodChannel? = null) : ) } } - // / For each data point, extract the contents and send them to Flutter, along with - // date and - // unit. + // For each data point, extract the contents and send them to Flutter, along with + // date and unit. val healthData = dataPoints.mapIndexed { _, dataPoint -> return@mapIndexed hashMapOf( diff --git a/packages/health/lib/src/health_plugin.dart b/packages/health/lib/src/health_plugin.dart index 66f7caa76..fb8e1b763 100644 --- a/packages/health/lib/src/health_plugin.dart +++ b/packages/health/lib/src/health_plugin.dart @@ -558,8 +558,11 @@ class Health { /// Fetch a list of health data points based on [types]. Future> getHealthDataFromTypes( - DateTime startTime, DateTime endTime, List types, - {bool includeManualEntry = true}) async { + DateTime startTime, + DateTime endTime, + List types, { + bool includeManualEntry = true, + }) async { List dataPoints = []; for (var type in types) { @@ -613,10 +616,11 @@ class Health { /// Prepares an interval query, i.e. checks if the types are available, etc. Future> _prepareQuery( - DateTime startTime, - DateTime endTime, - HealthDataType dataType, - bool includeManualEntry) async { + DateTime startTime, + DateTime endTime, + HealthDataType dataType, + bool includeManualEntry, + ) async { // Ask for device ID only once _deviceId ??= platformType == PlatformType.ANDROID ? (await _deviceInfo.androidInfo).id