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

pull/2567/head
Hossein Yousefi 8 months ago committed by GitHub
parent c33edaf05a
commit ce50aafa6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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.

@ -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()

@ -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();
}

@ -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:

File diff suppressed because it is too large Load Diff

@ -10,12 +10,12 @@ dependencies:
flutter:
sdk: flutter
plugin_platform_interface: ^2.1.8
jni: ^0.12.0
jni: ^0.13.0
ffi: ^2.1.2
dev_dependencies:
ffigen: ^16.0.0
jnigen: ^0.13.0
jnigen: ^0.13.1
flutter_test:
sdk: flutter
flutter_lints: ^5.0.0

Loading…
Cancel
Save