Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions src/content/tools/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,34 +267,44 @@ void main() {
## Example projects

There are several example projects to help you get started
with hooks:

| **Project** | **Description** |
| ---------------------------- | --------------------------------------------------------------------------------- |
| [`native_add_library`][] | Native code that should be bundled with Dart and Flutter applications. |
| [`native_add_app`][] | Invocation of native code bundled with the native assets feature. |
| [`download_asset`][] | Library depending on prebuilt assets which are downloaded in the build hook. |
| [`native_dynamic_linking`][] | Builds three native libraries, two of which are dynamically linked to each other. |
| [`system_library`][] | A Dart library using a native system library. |
| [`use_dart_api`][] | Project that uses the C API of the Dart VM. |
with hooks and code assets:

| **Project** | **Description** |
| ---------------------------- | --------------------------------------------------------------------------------------- |
| [`sqlite`][] | A package compiling, bundling, and using a native database engine. |
| [`mini_audio`][] | A package compiling, bundling, and using a native audio player. |
| [`stb_image`][] | A package compiling, bundling, and using a native image library. |
| [`host_name`][] | A package using a native system library. |
| [`native_add_library`][] | A package compiling, bundling, and using some simple C code. |
| [`native_add_app`][] | A Dart CLI application that depends on `native_add_library`. |
| [`download_asset`][] | A package bundling and using prebuilt assets that are downloaded in the build hook. |
| [`native_dynamic_linking`][] | A package compiling, bundling, and using three native libraries that depend on each other. |
| [`use_dart_api`][] | A package that uses the C API of the Dart VM. |

{: .table .table-striped }

[`native_add_library`]: {{site.repo.dart.org}}/native/blob/main/pkgs/hooks/example/build/native_add_library
[`native_add_app`]: {{site.repo.dart.org}}/native/tree/main/pkgs/hooks/example/build/native_add_app
[`download_asset`]: {{site.repo.dart.org}}/native/tree/main/pkgs/hooks/example/build/download_asset
[`native_dynamic_linking`]: {{site.repo.dart.org}}/native/tree/main/pkgs/hooks/example/build/native_dynamic_linking
[`system_library`]: {{site.repo.dart.org}}/native/tree/main/pkgs/hooks/example/build/system_library
[`use_dart_api`]: {{site.repo.dart.org}}/native/tree/main/pkgs/hooks/example/build/use_dart_api
[`host_name`]: {{site.repo.dart.org}}/native/tree/main/pkgs/code_assets/example/host_name
[`sqlite`]: {{site.repo.dart.org}}/native/tree/main/pkgs/code_assets/example/sqlite
[`mini_audio`]: {{site.repo.dart.org}}/native/tree/main/pkgs/code_assets/example/mini_audio
[`stb_image`]: {{site.repo.dart.org}}/native/tree/main/pkgs/code_assets/example/stb_image

## More information

See the following links for more information:

* [Hooks package][]
* [Hooks library reference][]
* [Code assets package][]
* [Code assets library reference][]
* [C interop][]

[Hooks package]: {{site.pub-pkg}}/hooks
[Hooks library reference]: {{site.pub-api}}/hooks/latest/hooks/
[Code assets package]: {{site.pub-pkg}}/code_assets
[Code assets library reference]: {{site.pub-api}}/code_assets/latest/code_assets/
[C interop]: /interop/c-interop