Skip to content

Commit

Permalink
Bump jni from 0.11.0 to 0.12.0 in /experimental/pedometer (#2465)
Browse files Browse the repository at this point in the history
Bumps [jni](https://github.com/dart-lang/native/tree/main/pkgs) from
0.11.0 to 0.12.0.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/dart-lang/native/commits/HEAD/pkgs">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=jni&package-manager=pub&previous-version=0.11.0&new-version=0.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Brett Morgan <brett.morgan@gmail.com>
Co-authored-by: Hossein Yousefi <yousefi@google.com>
  • Loading branch information
3 people authored Oct 8, 2024
1 parent 8ecb09f commit 35787ba
Show file tree
Hide file tree
Showing 4 changed files with 15,486 additions and 14,325 deletions.
8 changes: 5 additions & 3 deletions experimental/pedometer/example/lib/steps_repo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:intl/intl.dart';
import 'package:jni/jni.dart' as jni;
import 'package:pedometer/pedometer_bindings_generated.dart' as pd;
import 'package:pedometer/health_connect.dart' as hc;
import 'package:pedometer/pedometer_bindings_generated.dart' as pd;

/// Class to hold the information needed for the chart
class Steps {
Expand Down Expand Up @@ -124,10 +124,12 @@ class _AndroidStepsRepo implements StepsRepo {
late final hc.HealthConnectClient client;

_AndroidStepsRepo() {
// ignore: invalid_use_of_internal_member
activity = hc.Activity.fromReference(jni.Jni.getCurrentActivity());
applicationContext =
// ignore: invalid_use_of_internal_member
hc.Context.fromReference(jni.Jni.getCachedApplicationContext());
client = hc.HealthConnectClient.getOrCreate1(applicationContext);
client = hc.HealthConnectClient.getOrCreate$1(applicationContext);
}

@override
Expand All @@ -153,7 +155,7 @@ class _AndroidStepsRepo implements StepsRepo {
}
final data = await Future.wait(futures);
return data.asMap().entries.map((entry) {
final stepsLong = entry.value.get0(hc.StepsRecord.COUNT_TOTAL);
final stepsLong = entry.value.get(hc.StepsRecord.COUNT_TOTAL);
final steps = stepsLong.isNull ? 0 : stepsLong.intValue();
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.19.0
jni: ^0.11.0
jni: ^0.12.0
fl_chart: ^0.69.0

dev_dependencies:
Expand Down
Loading

0 comments on commit 35787ba

Please sign in to comment.