Skip to content

Commit

Permalink
health - code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bardram committed Mar 30, 2024
1 parent f5fef33 commit 58687eb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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(
Expand Down
16 changes: 10 additions & 6 deletions packages/health/lib/src/health_plugin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,11 @@ class Health {

/// Fetch a list of health data points based on [types].
Future<List<HealthDataPoint>> getHealthDataFromTypes(
DateTime startTime, DateTime endTime, List<HealthDataType> types,
{bool includeManualEntry = true}) async {
DateTime startTime,
DateTime endTime,
List<HealthDataType> types, {
bool includeManualEntry = true,
}) async {
List<HealthDataPoint> dataPoints = [];

for (var type in types) {
Expand Down Expand Up @@ -613,10 +616,11 @@ class Health {

/// Prepares an interval query, i.e. checks if the types are available, etc.
Future<List<HealthDataPoint>> _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
Expand Down

0 comments on commit 58687eb

Please sign in to comment.