Skip to content

Commit ce50aaf

Browse files
[exp/pedometer] Upgrade jnigen to 0.13.1 (#2566)
1 parent c33edaf commit ce50aaf

File tree

7 files changed

+13162
-11138
lines changed

7 files changed

+13162
-11138
lines changed

experimental/pedometer/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ apply plugin: 'com.android.library'
2727
android {
2828
// Bumping the plugin compileSdkVersion requires all clients of this plugin
2929
// to bump the version in their app.
30-
compileSdkVersion 31
30+
compileSdkVersion 34
3131

3232
// Bumping the plugin ndkVersion requires all clients of this plugin to bump
3333
// the version in their app and to download a newer version of the NDK.

experimental/pedometer/example/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ android {
5353
applicationId "com.example.jni_demo"
5454
// You can update the following values to match your application needs.
5555
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
56-
compileSdkVersion 33
56+
compileSdkVersion 34
5757
minSdkVersion 30
5858
targetSdkVersion flutter.targetSdkVersion
5959
versionCode flutterVersionCode.toInteger()

experimental/pedometer/example/lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import 'package:fl_chart/fl_chart.dart';
12
import 'package:flutter/material.dart';
23
import 'package:intl/intl.dart';
3-
import 'package:fl_chart/fl_chart.dart';
44

55
import 'steps_repo.dart';
66

@@ -198,8 +198,8 @@ Widget getBottomTitles(double value, TitleMeta meta) {
198198
_ => ''
199199
};
200200
return SideTitleWidget(
201-
axisSide: meta.axisSide,
202201
space: 4,
202+
meta: meta,
203203
child: Text(
204204
timeText,
205205
style: TextStyle(fontSize: 14, color: Colors.blue[900]),

experimental/pedometer/example/lib/steps_repo.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ class _AndroidStepsRepo implements StepsRepo {
146146
{hc.StepsRecord.COUNT_TOTAL}
147147
.toJSet(hc.AggregateMetric.type(jni.JLong.type)),
148148
hc.TimeRangeFilter.between(
149-
hc.Instant.ofEpochMilli(start),
150-
hc.Instant.ofEpochMilli(end),
149+
hc.Instant.ofEpochMilli(start)!,
150+
hc.Instant.ofEpochMilli(end)!,
151151
),
152152
jni.JSet.hash(jni.JObject.type),
153153
);
@@ -156,7 +156,7 @@ class _AndroidStepsRepo implements StepsRepo {
156156
final data = await Future.wait(futures);
157157
return data.asMap().entries.map((entry) {
158158
final stepsLong = entry.value.get(hc.StepsRecord.COUNT_TOTAL);
159-
final steps = stepsLong.isNull ? 0 : stepsLong.intValue();
159+
final steps = stepsLong?.intValue() ?? 0;
160160
return Steps(entry.key.toString().padLeft(2, '0'), steps);
161161
}).toList();
162162
}

experimental/pedometer/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ dependencies:
4141

4242
ffi: ^2.1.2
4343
intl: ^0.20.0
44-
jni: ^0.12.0
44+
jni: ^0.13.0
4545
fl_chart: ^0.70.0
4646

4747
dev_dependencies:

0 commit comments

Comments
 (0)