1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

[exp/pedometer] Upgrade jnigen to 0.13.1 (#2566)

This commit is contained in:
Hossein Yousefi
2025-01-23 11:57:20 +01:00
committed by GitHub
parent c33edaf05a
commit ce50aafa6b
7 changed files with 13131 additions and 11107 deletions

View File

@@ -146,8 +146,8 @@ class _AndroidStepsRepo implements StepsRepo {
{hc.StepsRecord.COUNT_TOTAL}
.toJSet(hc.AggregateMetric.type(jni.JLong.type)),
hc.TimeRangeFilter.between(
hc.Instant.ofEpochMilli(start),
hc.Instant.ofEpochMilli(end),
hc.Instant.ofEpochMilli(start)!,
hc.Instant.ofEpochMilli(end)!,
),
jni.JSet.hash(jni.JObject.type),
);
@@ -156,7 +156,7 @@ class _AndroidStepsRepo implements StepsRepo {
final data = await Future.wait(futures);
return data.asMap().entries.map((entry) {
final stepsLong = entry.value.get(hc.StepsRecord.COUNT_TOTAL);
final steps = stepsLong.isNull ? 0 : stepsLong.intValue();
final steps = stepsLong?.intValue() ?? 0;
return Steps(entry.key.toString().padLeft(2, '0'), steps);
}).toList();
}