1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-09 14:28:51 +00:00
Commit Graph

4 Commits

Author SHA1 Message Date
Liam Appelbe
f0e6da6d24 Simplify experimental pedometer example (#2104)
Since ffigen added support for
[`NativeCallable.listener`](https://api.flutter.dev/flutter/dart-ffi/NativeCallable/NativeCallable.listener.html)
to its ObjC bindings, this example can be simplified. We can replace the
`Dart_Port` logic with `ObjCBlock.listener`, which lets us get rid of
most of the native code.

We still need a small bit of native code to `retain` a reference to the
callback's arguments before invoking the listener, otherwise the
arguments may be ref counted and deleted before the Dart side of the
callback is invoked. See https://github.com/dart-lang/native/issues/835
2023-12-06 18:58:58 +10:00
Hossein Yousefi
aff3b0979e Update pedometer to jni and jnigen:0.5.0 (#1863)
Updates the pedometer sample to the latest version of jni and jnigen.
2023-06-02 09:12:44 +02:00
Brett Morgan
1a383e9361 experimental/pedometer: fixup linter warning (#1589) 2023-01-24 11:32:13 +10:00
Brett Morgan
70f3daa9f7 Add experimental/pedometer (#1587)
* Add `experimental/pedometer`

* Fixup for linter warnings

* Update CI config
2023-01-24 10:31:12 +10:00