1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00
Files
samples/experimental
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
..
2021-03-15 10:57:10 +11:00

Master channel samples

In this directory, you'll find samples that target Flutter's master channel. They may take advantage of new SDK features that haven't landed in the stable channel, and they may crash, lock up your machine, or otherwise fail to run correctly. In other words, consider everything in this directory to be an experiment.

We're maintaining these samples here so that folks can see some of Flutter's upcoming features as they evolve and get a sense for how they'll eventually be used. If you'd like to run the apps, make sure to switch to the master channel first:

flutter channel master
flutter upgrade

When you're done, use this command to return to the safety of the stable channel:

flutter channel stable

Want more info about the repo in general?

See the README in the repo's root folder.