Skip to content

[exp/pedometer] Upgrade jnigen to 0.13.1 #2566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion experimental/pedometer/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ apply plugin: 'com.android.library'
android {
// Bumping the plugin compileSdkVersion requires all clients of this plugin
// to bump the version in their app.
compileSdkVersion 31
compileSdkVersion 34

// Bumping the plugin ndkVersion requires all clients of this plugin to bump
// the version in their app and to download a newer version of the NDK.
Expand Down
2 changes: 1 addition & 1 deletion experimental/pedometer/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ android {
applicationId "com.example.jni_demo"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
compileSdkVersion 33
compileSdkVersion 34
minSdkVersion 30
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
Expand Down
4 changes: 2 additions & 2 deletions experimental/pedometer/example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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]),
Expand Down
6 changes: 3 additions & 3 deletions experimental/pedometer/example/lib/steps_repo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
Expand All @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion experimental/pedometer/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependencies:

ffi: ^2.1.2
intl: ^0.20.0
jni: ^0.12.0
jni: ^0.13.0
fl_chart: ^0.70.0

dev_dependencies:
Expand Down
Loading
Loading