blob: 5a00ac4e67df0144208c0fe41152960ae2ecacb7 [file] [view]
An example library containing native code that should be bundled with Dart and
Flutter applications.
## Usage
Run tests with `dart --enable-experiment=native-assets test`.
## Code organization
A typical layout of a package with native code is:
* `hook/build.dart` implements the CLI that communicates which native assets to
build/bundle with the Dart/Flutter SDK.
* `lib/` contains Dart code which uses [`dart:ffi`] and [`package:ffigen`]
to call into native code.
* `src/` contains C code which is built and then invoked through `dart:ffi`.