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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user