mirror of
https://github.com/flutter/samples.git
synced 2026-06-28 09:07:20 +00:00
[exp/pedometer] Upgrade jnigen to 0.13.1 (#2566)
This commit is contained in:
@@ -27,7 +27,7 @@ apply plugin: 'com.android.library'
|
|||||||
android {
|
android {
|
||||||
// Bumping the plugin compileSdkVersion requires all clients of this plugin
|
// Bumping the plugin compileSdkVersion requires all clients of this plugin
|
||||||
// to bump the version in their app.
|
// to bump the version in their app.
|
||||||
compileSdkVersion 31
|
compileSdkVersion 34
|
||||||
|
|
||||||
// Bumping the plugin ndkVersion requires all clients of this plugin to bump
|
// 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.
|
// the version in their app and to download a newer version of the NDK.
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ android {
|
|||||||
applicationId "com.example.jni_demo"
|
applicationId "com.example.jni_demo"
|
||||||
// You can update the following values to match your application needs.
|
// 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.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
|
||||||
compileSdkVersion 33
|
compileSdkVersion 34
|
||||||
minSdkVersion 30
|
minSdkVersion 30
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
import 'package:fl_chart/fl_chart.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:fl_chart/fl_chart.dart';
|
|
||||||
|
|
||||||
import 'steps_repo.dart';
|
import 'steps_repo.dart';
|
||||||
|
|
||||||
@@ -198,8 +198,8 @@ Widget getBottomTitles(double value, TitleMeta meta) {
|
|||||||
_ => ''
|
_ => ''
|
||||||
};
|
};
|
||||||
return SideTitleWidget(
|
return SideTitleWidget(
|
||||||
axisSide: meta.axisSide,
|
|
||||||
space: 4,
|
space: 4,
|
||||||
|
meta: meta,
|
||||||
child: Text(
|
child: Text(
|
||||||
timeText,
|
timeText,
|
||||||
style: TextStyle(fontSize: 14, color: Colors.blue[900]),
|
style: TextStyle(fontSize: 14, color: Colors.blue[900]),
|
||||||
|
|||||||
@@ -146,8 +146,8 @@ class _AndroidStepsRepo implements StepsRepo {
|
|||||||
{hc.StepsRecord.COUNT_TOTAL}
|
{hc.StepsRecord.COUNT_TOTAL}
|
||||||
.toJSet(hc.AggregateMetric.type(jni.JLong.type)),
|
.toJSet(hc.AggregateMetric.type(jni.JLong.type)),
|
||||||
hc.TimeRangeFilter.between(
|
hc.TimeRangeFilter.between(
|
||||||
hc.Instant.ofEpochMilli(start),
|
hc.Instant.ofEpochMilli(start)!,
|
||||||
hc.Instant.ofEpochMilli(end),
|
hc.Instant.ofEpochMilli(end)!,
|
||||||
),
|
),
|
||||||
jni.JSet.hash(jni.JObject.type),
|
jni.JSet.hash(jni.JObject.type),
|
||||||
);
|
);
|
||||||
@@ -156,7 +156,7 @@ class _AndroidStepsRepo implements StepsRepo {
|
|||||||
final data = await Future.wait(futures);
|
final data = await Future.wait(futures);
|
||||||
return data.asMap().entries.map((entry) {
|
return data.asMap().entries.map((entry) {
|
||||||
final stepsLong = entry.value.get(hc.StepsRecord.COUNT_TOTAL);
|
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);
|
return Steps(entry.key.toString().padLeft(2, '0'), steps);
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ dependencies:
|
|||||||
|
|
||||||
ffi: ^2.1.2
|
ffi: ^2.1.2
|
||||||
intl: ^0.20.0
|
intl: ^0.20.0
|
||||||
jni: ^0.12.0
|
jni: ^0.13.0
|
||||||
fl_chart: ^0.70.0
|
fl_chart: ^0.70.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -10,12 +10,12 @@ dependencies:
|
|||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
plugin_platform_interface: ^2.1.8
|
plugin_platform_interface: ^2.1.8
|
||||||
jni: ^0.12.0
|
jni: ^0.13.0
|
||||||
ffi: ^2.1.2
|
ffi: ^2.1.2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
ffigen: ^16.0.0
|
ffigen: ^16.0.0
|
||||||
jnigen: ^0.13.0
|
jnigen: ^0.13.1
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_lints: ^5.0.0
|
flutter_lints: ^5.0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user