mirror of
https://github.com/flutter/samples.git
synced 2026-03-25 22:01:51 +00:00
[exp/pedometer] Upgrade jnigen to 0.13.1 (#2566)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import 'package:fl_chart/fl_chart.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:fl_chart/fl_chart.dart';
|
||||
|
||||
import 'steps_repo.dart';
|
||||
|
||||
@@ -198,8 +198,8 @@ Widget getBottomTitles(double value, TitleMeta meta) {
|
||||
_ => ''
|
||||
};
|
||||
return SideTitleWidget(
|
||||
axisSide: meta.axisSide,
|
||||
space: 4,
|
||||
meta: meta,
|
||||
child: Text(
|
||||
timeText,
|
||||
style: TextStyle(fontSize: 14, color: Colors.blue[900]),
|
||||
|
||||
@@ -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