Bumps [fl_chart](https://github.com/imaNNeo/fl_chart) from 0.62.0 to 0.63.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/imaNNeo/fl_chart/releases">fl_chart's releases</a>.</em></p> <blockquote> <h2>0.63.0</h2> <ul> <li><strong>BUGFIX</strong> (by <a href="https://github.com/imaNNeo"><code>@imaNNeo</code></a>) Fix PieChart crash on web-renderer html by ignoring <code>sectionsSpace</code> when <code>Path.combine()</code> does not work (it's flutter engine <a href="https://redirect.github.com/flutter/flutter/issues/44572">issue</a>), <a href="https://redirect.github.com/imaNNeo/fl_chart/issues/955">#955</a></li> <li><strong>BUGFIX</strong> (by <a href="https://github.com/imaNNeo"><code>@imaNNeo</code></a>) Fix ScatterChart long-press interaction bug (disappears when long-pressing on the chart), <a href="https://redirect.github.com/imaNNeo/fl_chart/issues/1318">#1318</a></li> <li><strong>FEATURE</strong> (by <a href="https://github.com/imaNNeo"><code>@imaNNeo</code></a>) Upgrade dart version to <a href="https://dart.dev/resources/dart-3-migration">3.0</a></li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/imaNNeo/fl_chart/blob/master/CHANGELOG.md">fl_chart's changelog</a>.</em></p> <blockquote> <h2>0.63.0</h2> <ul> <li><strong>BUGFIX</strong> (by <a href="https://github.com/imaNNeo"><code>@imaNNeo</code></a>) Fix PieChart crash on web-renderer html by ignoring <code>sectionsSpace</code> when <code>Path.combine()</code> does not work (it's flutter engine <a href="https://redirect.github.com/flutter/flutter/issues/44572">issue</a>), <a href="https://redirect.github.com/imaNNeo/fl_chart/issues/955">#955</a></li> <li><strong>BUGFIX</strong> (by <a href="https://github.com/imaNNeo"><code>@imaNNeo</code></a>) Fix ScatterChart long-press interaction bug (disappears when long-pressing on the chart), <a href="https://redirect.github.com/imaNNeo/fl_chart/issues/1318">#1318</a></li> <li><strong>FEATURE</strong> (by <a href="https://github.com/imaNNeo"><code>@imaNNeo</code></a>) Upgrade dart version to <a href="https://dart.dev/resources/dart-3-migration">3.0</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="6c0e43f7e7"><code>6c0e43f</code></a> Bump version to 0.63.0</li> <li><a href="81a2618d1b"><code>81a2618</code></a> Update github publish action</li> <li><a href="3b2188d3f2"><code>3b2188d</code></a> Update line_chart.md</li> <li><a href="872878b0ce"><code>872878b</code></a> Fix analyze issues with Dart 3.0</li> <li><a href="2984262886"><code>2984262</code></a> chore: bump very_good_analysis from 4.0.0+1 to 5.0.0</li> <li><a href="ba1fa734b7"><code>ba1fa73</code></a> docs wrong link fix</li> <li><a href="f91d4bf322"><code>f91d4bf</code></a> Update CHANGELOG.md</li> <li><a href="5db8f6db61"><code>5db8f6d</code></a> Update tests to fix the CI issue</li> <li><a href="6db877acec"><code>6db877a</code></a> Fix analyze issues</li> <li><a href="46ef2c0dc5"><code>46ef2c0</code></a> Upgrade dependencies</li> <li>Additional commits viewable in <a href="https://github.com/imaNNeo/fl_chart/compare/0.62.0...0.63.0">compare view</a></li> </ul> </details> <br /> [](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 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: Hossein Yousefi <yousefi@google.com>
FFIgen + JNIgen pedometer
This is a demo for some of our tooling around calling platform APIs directly from dart code. This repository represents a demo of a plugin that leverages FFIgen & JNIgen. There is also an example pedometer app that uses the bindings generated from these tools.
- FFIgen is used to generate bindings for C, Objective-C and Swift APIs
- JNIgen is used to generate bindings for Java and Kotlin APIs
These tools are both experimental and are currently a work in progress. If you find any issues or have feedback, please file it on the corresponding Github repositories.
Re-generating bindings
The bindings that allow the dart code to call the platform code have already been generated here. You can regenerate them by following the steps below.
FFIgen
Configuration for FFIgen is here for the CoreMotion framework. FFIgen currently does not support autogenerating the code to handle callbacks. So, there were a few steps needed to appropriately handle callbacks in Objective-C. You can read more here.
dart run ffigen --config ffigen.yaml
JNIgen
Configuration for JNIgen is here for the HealthConnect API.
cd Example && flutter build apkcd .. && dart run jnigen --config jnigen.yaml
Running the example app
Note that step counting is only available on physical devices.
iOS
flutter run- Allow pedometer app access to step counting
Android
- Make sure that Google Fit is installed (to ensure that steps are being counted)
flutter run- Install Health Connect and grant access to Google Fit and the jni_demo app
Project stucture
-
src: Contains the native source code, and a CMakeLists.txt file for building that source code into a dynamic library. -
lib: Contains the Dart code that defines the API of the plugin, and which calls into the native code usingdart:ffi. -
platform folders (
iosetc.): Contains the build files for building and bundling the native code library with the platform application. -
example: Contains the native source code for building that source code into a dynamic library.